linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: media: omap4iss: Remove unused macro functions
@ 2021-04-12 13:42 Aline Santana Cordeiro
  2021-04-12 18:08 ` kernel test robot
  2021-04-13 15:06 ` Hans Verkuil
  0 siblings, 2 replies; 5+ messages in thread
From: Aline Santana Cordeiro @ 2021-04-12 13:42 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

Remove unused macro functions "to_iss_device()", "to_device()",
and "v4l2_dev_to_iss_device(dev)".

Signed-off-by: Aline Santana Cordeiro <alinesantanacordeiro@gmail.com>
---
 drivers/staging/media/omap4iss/iss.h | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/media/omap4iss/iss.h b/drivers/staging/media/omap4iss/iss.h
index b88f952..a354d5f 100644
--- a/drivers/staging/media/omap4iss/iss.h
+++ b/drivers/staging/media/omap4iss/iss.h
@@ -29,11 +29,6 @@
 
 struct regmap;
 
-#define to_iss_device(ptr_module)				\
-	container_of(ptr_module, struct iss_device, ptr_module)
-#define to_device(ptr_module)						\
-	(to_iss_device(ptr_module)->dev)
-
 enum iss_mem_resources {
 	OMAP4_ISS_MEM_TOP,
 	OMAP4_ISS_MEM_CSI2_A_REGS1,
@@ -119,9 +114,6 @@ struct iss_device {
 	unsigned int isp_subclk_resources;
 };
 
-#define v4l2_dev_to_iss_device(dev) \
-	container_of(dev, struct iss_device, v4l2_dev)
-
 int omap4iss_get_external_info(struct iss_pipeline *pipe,
 			       struct media_link *link);
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: media: omap4iss: Remove unused macro functions
  2021-04-12 13:42 [PATCH] staging: media: omap4iss: Remove unused macro functions Aline Santana Cordeiro
@ 2021-04-12 18:08 ` kernel test robot
  2021-04-13 15:06 ` Hans Verkuil
  1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-04-12 18:08 UTC (permalink / raw)
  To: Aline Santana Cordeiro, Laurent Pinchart, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: kbuild-all, linux-media, linux-staging, linux-kernel, outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 14237 bytes --]

Hi Aline,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Aline-Santana-Cordeiro/staging-media-omap4iss-Remove-unused-macro-functions/20210412-214331
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git f2f560e1bdc055a6a306e6b7823ba589794e6564
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/6cadf4b043c1d68e2afb77278b7d0deaee3a5222
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Aline-Santana-Cordeiro/staging-media-omap4iss-Remove-unused-macro-functions/20210412-214331
        git checkout 6cadf4b043c1d68e2afb77278b7d0deaee3a5222
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   drivers/staging/media/omap4iss/iss_ipipeif.c: In function 'ipipeif_print_status':
>> drivers/staging/media/omap4iss/iss_ipipeif.c:51:27: error: implicit declaration of function 'to_iss_device'; did you mean 'to_spi_device'? [-Werror=implicit-function-declaration]
      51 |  struct iss_device *iss = to_iss_device(ipipeif);
         |                           ^~~~~~~~~~~~~
         |                           to_spi_device
>> drivers/staging/media/omap4iss/iss_ipipeif.c:51:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   drivers/staging/media/omap4iss/iss_ipipeif.c: In function 'ipipeif_write_enable':
   drivers/staging/media/omap4iss/iss_ipipeif.c:80:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      80 |  struct iss_device *iss = to_iss_device(ipipeif);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_ipipeif.c: In function 'ipipeif_enable':
   drivers/staging/media/omap4iss/iss_ipipeif.c:93:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      93 |  struct iss_device *iss = to_iss_device(ipipeif);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_ipipeif.c: In function 'ipipeif_set_outaddr':
   drivers/staging/media/omap4iss/iss_ipipeif.c:112:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     112 |  struct iss_device *iss = to_iss_device(ipipeif);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_ipipeif.c: In function 'ipipeif_configure':
   drivers/staging/media/omap4iss/iss_ipipeif.c:123:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     123 |  struct iss_device *iss = to_iss_device(ipipeif);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_ipipeif.c: In function 'ipipeif_set_stream':
   drivers/staging/media/omap4iss/iss_ipipeif.c:305:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     305 |  struct iss_device *iss = to_iss_device(ipipeif);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_ipipeif.c: In function 'ipipeif_link_setup':
   drivers/staging/media/omap4iss/iss_ipipeif.c:660:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     660 |  struct iss_device *iss = to_iss_device(ipipeif);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_ipipeif.c: In function 'ipipeif_init_entities':
>> drivers/staging/media/omap4iss/iss_ipipeif.c:755:25: warning: assignment to 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     755 |  ipipeif->video_out.iss = to_iss_device(ipipeif);
         |                         ^
   cc1: some warnings being treated as errors
--
   drivers/staging/media/omap4iss/iss_ipipe.c: In function 'ipipe_print_status':
>> drivers/staging/media/omap4iss/iss_ipipe.c:47:27: error: implicit declaration of function 'to_iss_device'; did you mean 'to_spi_device'? [-Werror=implicit-function-declaration]
      47 |  struct iss_device *iss = to_iss_device(ipipe);
         |                           ^~~~~~~~~~~~~
         |                           to_spi_device
>> drivers/staging/media/omap4iss/iss_ipipe.c:47:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   drivers/staging/media/omap4iss/iss_ipipe.c: In function 'ipipe_enable':
   drivers/staging/media/omap4iss/iss_ipipe.c:72:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      72 |  struct iss_device *iss = to_iss_device(ipipe);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_ipipe.c: In function 'ipipe_configure':
   drivers/staging/media/omap4iss/iss_ipipe.c:84:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      84 |  struct iss_device *iss = to_iss_device(ipipe);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_ipipe.c: In function 'ipipe_set_stream':
   drivers/staging/media/omap4iss/iss_ipipe.c:131:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     131 |  struct iss_device *iss = to_iss_device(ipipe);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_ipipe.c: In function 'ipipe_link_setup':
   drivers/staging/media/omap4iss/iss_ipipe.c:444:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     444 |  struct iss_device *iss = to_iss_device(ipipe);
         |                           ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/staging/media/omap4iss/iss_resizer.c: In function 'resizer_print_status':
>> drivers/staging/media/omap4iss/iss_resizer.c:43:27: error: implicit declaration of function 'to_iss_device'; did you mean 'to_spi_device'? [-Werror=implicit-function-declaration]
      43 |  struct iss_device *iss = to_iss_device(resizer);
         |                           ^~~~~~~~~~~~~
         |                           to_spi_device
>> drivers/staging/media/omap4iss/iss_resizer.c:43:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   drivers/staging/media/omap4iss/iss_resizer.c: In function 'resizer_enable':
   drivers/staging/media/omap4iss/iss_resizer.c:113:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     113 |  struct iss_device *iss = to_iss_device(resizer);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_resizer.c: In function 'resizer_set_outaddr':
   drivers/staging/media/omap4iss/iss_resizer.c:136:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     136 |  struct iss_device *iss = to_iss_device(resizer);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_resizer.c: In function 'resizer_configure':
   drivers/staging/media/omap4iss/iss_resizer.c:183:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     183 |  struct iss_device *iss = to_iss_device(resizer);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_resizer.c: In function 'omap4iss_resizer_isr':
   drivers/staging/media/omap4iss/iss_resizer.c:288:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     288 |  struct iss_device *iss = to_iss_device(resizer);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_resizer.c: In function 'resizer_set_stream':
   drivers/staging/media/omap4iss/iss_resizer.c:353:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     353 |  struct iss_device *iss = to_iss_device(resizer);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_resizer.c: In function 'resizer_link_setup':
   drivers/staging/media/omap4iss/iss_resizer.c:714:27: warning: initialization of 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     714 |  struct iss_device *iss = to_iss_device(resizer);
         |                           ^~~~~~~~~~~~~
   drivers/staging/media/omap4iss/iss_resizer.c: In function 'resizer_init_entities':
>> drivers/staging/media/omap4iss/iss_resizer.c:797:25: warning: assignment to 'struct iss_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     797 |  resizer->video_out.iss = to_iss_device(resizer);
         |                         ^
   cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
   Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
   Selected by
   - SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
   - SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC


vim +51 drivers/staging/media/omap4iss/iss_ipipeif.c

714148260d0585 Sergio Aguirre   2011-01-24  30  
714148260d0585 Sergio Aguirre   2011-01-24  31  /*
714148260d0585 Sergio Aguirre   2011-01-24  32   * ipipeif_print_status - Print current IPIPEIF Module register values.
714148260d0585 Sergio Aguirre   2011-01-24  33   * @ipipeif: Pointer to ISS ISP IPIPEIF device.
714148260d0585 Sergio Aguirre   2011-01-24  34   *
714148260d0585 Sergio Aguirre   2011-01-24  35   * Also prints other debug information stored in the IPIPEIF module.
714148260d0585 Sergio Aguirre   2011-01-24  36   */
714148260d0585 Sergio Aguirre   2011-01-24  37  #define IPIPEIF_PRINT_REGISTER(iss, name)\
714148260d0585 Sergio Aguirre   2011-01-24  38  	dev_dbg(iss->dev, "###IPIPEIF " #name "=0x%08x\n", \
11abbfd30f74f7 Laurent Pinchart 2013-08-30  39  		iss_reg_read(iss, OMAP4_ISS_MEM_ISP_IPIPEIF, IPIPEIF_##name))
714148260d0585 Sergio Aguirre   2011-01-24  40  
714148260d0585 Sergio Aguirre   2011-01-24  41  #define ISIF_PRINT_REGISTER(iss, name)\
714148260d0585 Sergio Aguirre   2011-01-24  42  	dev_dbg(iss->dev, "###ISIF " #name "=0x%08x\n", \
11abbfd30f74f7 Laurent Pinchart 2013-08-30  43  		iss_reg_read(iss, OMAP4_ISS_MEM_ISP_ISIF, ISIF_##name))
714148260d0585 Sergio Aguirre   2011-01-24  44  
714148260d0585 Sergio Aguirre   2011-01-24  45  #define ISP5_PRINT_REGISTER(iss, name)\
714148260d0585 Sergio Aguirre   2011-01-24  46  	dev_dbg(iss->dev, "###ISP5 " #name "=0x%08x\n", \
11abbfd30f74f7 Laurent Pinchart 2013-08-30  47  		iss_reg_read(iss, OMAP4_ISS_MEM_ISP_SYS1, ISP5_##name))
714148260d0585 Sergio Aguirre   2011-01-24  48  
714148260d0585 Sergio Aguirre   2011-01-24  49  static void ipipeif_print_status(struct iss_ipipeif_device *ipipeif)
714148260d0585 Sergio Aguirre   2011-01-24  50  {
714148260d0585 Sergio Aguirre   2011-01-24 @51  	struct iss_device *iss = to_iss_device(ipipeif);
714148260d0585 Sergio Aguirre   2011-01-24  52  
714148260d0585 Sergio Aguirre   2011-01-24  53  	dev_dbg(iss->dev, "-------------IPIPEIF Register dump-------------\n");
714148260d0585 Sergio Aguirre   2011-01-24  54  
714148260d0585 Sergio Aguirre   2011-01-24  55  	IPIPEIF_PRINT_REGISTER(iss, CFG1);
714148260d0585 Sergio Aguirre   2011-01-24  56  	IPIPEIF_PRINT_REGISTER(iss, CFG2);
714148260d0585 Sergio Aguirre   2011-01-24  57  
714148260d0585 Sergio Aguirre   2011-01-24  58  	ISIF_PRINT_REGISTER(iss, SYNCEN);
714148260d0585 Sergio Aguirre   2011-01-24  59  	ISIF_PRINT_REGISTER(iss, CADU);
714148260d0585 Sergio Aguirre   2011-01-24  60  	ISIF_PRINT_REGISTER(iss, CADL);
714148260d0585 Sergio Aguirre   2011-01-24  61  	ISIF_PRINT_REGISTER(iss, MODESET);
714148260d0585 Sergio Aguirre   2011-01-24  62  	ISIF_PRINT_REGISTER(iss, CCOLP);
714148260d0585 Sergio Aguirre   2011-01-24  63  	ISIF_PRINT_REGISTER(iss, SPH);
714148260d0585 Sergio Aguirre   2011-01-24  64  	ISIF_PRINT_REGISTER(iss, LNH);
714148260d0585 Sergio Aguirre   2011-01-24  65  	ISIF_PRINT_REGISTER(iss, LNV);
54d0059c7bbc26 Laurent Pinchart 2013-08-28  66  	ISIF_PRINT_REGISTER(iss, VDINT(0));
714148260d0585 Sergio Aguirre   2011-01-24  67  	ISIF_PRINT_REGISTER(iss, HSIZE);
714148260d0585 Sergio Aguirre   2011-01-24  68  
714148260d0585 Sergio Aguirre   2011-01-24  69  	ISP5_PRINT_REGISTER(iss, SYSCONFIG);
714148260d0585 Sergio Aguirre   2011-01-24  70  	ISP5_PRINT_REGISTER(iss, CTRL);
714148260d0585 Sergio Aguirre   2011-01-24  71  	ISP5_PRINT_REGISTER(iss, IRQSTATUS(0));
714148260d0585 Sergio Aguirre   2011-01-24  72  	ISP5_PRINT_REGISTER(iss, IRQENABLE_SET(0));
714148260d0585 Sergio Aguirre   2011-01-24  73  	ISP5_PRINT_REGISTER(iss, IRQENABLE_CLR(0));
714148260d0585 Sergio Aguirre   2011-01-24  74  
714148260d0585 Sergio Aguirre   2011-01-24  75  	dev_dbg(iss->dev, "-----------------------------------------------\n");
714148260d0585 Sergio Aguirre   2011-01-24  76  }
714148260d0585 Sergio Aguirre   2011-01-24  77  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 54268 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: media: omap4iss: Remove unused macro functions
  2021-04-12 13:42 [PATCH] staging: media: omap4iss: Remove unused macro functions Aline Santana Cordeiro
  2021-04-12 18:08 ` kernel test robot
@ 2021-04-13 15:06 ` Hans Verkuil
  2021-04-13 18:21   ` ascordeiro
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Verkuil @ 2021-04-13 15:06 UTC (permalink / raw)
  To: Aline Santana Cordeiro, Laurent Pinchart, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

On 12/04/2021 15:42, Aline Santana Cordeiro wrote:
> Remove unused macro functions "to_iss_device()", "to_device()",
> and "v4l2_dev_to_iss_device(dev)".

'git grep to_iss_device drivers/staging/omap4iss' gives me lots of hits!
Same for to_device. Only v4l2_dev_to_iss_device appears to be unused.

Regards,

	Hans

> 
> Signed-off-by: Aline Santana Cordeiro <alinesantanacordeiro@gmail.com>
> ---
>  drivers/staging/media/omap4iss/iss.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/staging/media/omap4iss/iss.h b/drivers/staging/media/omap4iss/iss.h
> index b88f952..a354d5f 100644
> --- a/drivers/staging/media/omap4iss/iss.h
> +++ b/drivers/staging/media/omap4iss/iss.h
> @@ -29,11 +29,6 @@
>  
>  struct regmap;
>  
> -#define to_iss_device(ptr_module)				\
> -	container_of(ptr_module, struct iss_device, ptr_module)
> -#define to_device(ptr_module)						\
> -	(to_iss_device(ptr_module)->dev)
> -
>  enum iss_mem_resources {
>  	OMAP4_ISS_MEM_TOP,
>  	OMAP4_ISS_MEM_CSI2_A_REGS1,
> @@ -119,9 +114,6 @@ struct iss_device {
>  	unsigned int isp_subclk_resources;
>  };
>  
> -#define v4l2_dev_to_iss_device(dev) \
> -	container_of(dev, struct iss_device, v4l2_dev)
> -
>  int omap4iss_get_external_info(struct iss_pipeline *pipe,
>  			       struct media_link *link);
>  
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: media: omap4iss: Remove unused macro functions
  2021-04-13 15:06 ` Hans Verkuil
@ 2021-04-13 18:21   ` ascordeiro
  2021-04-14  8:02     ` Hans Verkuil
  0 siblings, 1 reply; 5+ messages in thread
From: ascordeiro @ 2021-04-13 18:21 UTC (permalink / raw)
  To: Hans Verkuil, Laurent Pinchart, Mauro Carvalho Chehab,
	Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

Em ter, 2021-04-13 às 17:06 +0200, Hans Verkuil escreveu:
> On 12/04/2021 15:42, Aline Santana Cordeiro wrote:
> > Remove unused macro functions "to_iss_device()", "to_device()",
> > and "v4l2_dev_to_iss_device(dev)".
> 
> 'git grep to_iss_device drivers/staging/omap4iss' gives me lots of
> hits!
> Same for to_device. Only v4l2_dev_to_iss_device appears to be unused.
> 
> Regards,
> 
>         Hans
> 
This command is really helpful, I didin't know. 
Thank you for the tip.

May I send a v2 removing just v4l2_dev_to_iss_device?

Thank you in advance,
Aline

> > 
> > Signed-off-by: Aline Santana Cordeiro <
> > alinesantanacordeiro@gmail.com>
> > ---
> >  drivers/staging/media/omap4iss/iss.h | 8 --------
> >  1 file changed, 8 deletions(-)
> > 
> > diff --git a/drivers/staging/media/omap4iss/iss.h
> > b/drivers/staging/media/omap4iss/iss.h
> > index b88f952..a354d5f 100644
> > --- a/drivers/staging/media/omap4iss/iss.h
> > +++ b/drivers/staging/media/omap4iss/iss.h
> > @@ -29,11 +29,6 @@
> >  
> >  struct regmap;
> >  
> > -#define to_iss_device(ptr_module)                              \
> > -       container_of(ptr_module, struct iss_device, ptr_module)
> > -#define
> > to_device(ptr_module)                                          \
> > -       (to_iss_device(ptr_module)->dev)
> > -
> >  enum iss_mem_resources {
> >         OMAP4_ISS_MEM_TOP,
> >         OMAP4_ISS_MEM_CSI2_A_REGS1,
> > @@ -119,9 +114,6 @@ struct iss_device {
> >         unsigned int isp_subclk_resources;
> >  };
> >  
> > -#define v4l2_dev_to_iss_device(dev) \
> > -       container_of(dev, struct iss_device, v4l2_dev)
> > -
> >  int omap4iss_get_external_info(struct iss_pipeline *pipe,
> >                                struct media_link *link);
> >  
> > 
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: media: omap4iss: Remove unused macro functions
  2021-04-13 18:21   ` ascordeiro
@ 2021-04-14  8:02     ` Hans Verkuil
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Verkuil @ 2021-04-14  8:02 UTC (permalink / raw)
  To: ascordeiro, Laurent Pinchart, Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: linux-media, linux-staging, linux-kernel, outreachy-kernel

On 13/04/2021 20:21, ascordeiro wrote:
> Em ter, 2021-04-13 às 17:06 +0200, Hans Verkuil escreveu:
>> On 12/04/2021 15:42, Aline Santana Cordeiro wrote:
>>> Remove unused macro functions "to_iss_device()", "to_device()",
>>> and "v4l2_dev_to_iss_device(dev)".
>>
>> 'git grep to_iss_device drivers/staging/omap4iss' gives me lots of
>> hits!
>> Same for to_device. Only v4l2_dev_to_iss_device appears to be unused.
>>
>> Regards,
>>
>>         Hans
>>
> This command is really helpful, I didin't know. 
> Thank you for the tip.
> 
> May I send a v2 removing just v4l2_dev_to_iss_device?

Sure, that's fine.

Regards,

	Hans

> 
> Thank you in advance,
> Aline
> 
>>>
>>> Signed-off-by: Aline Santana Cordeiro <
>>> alinesantanacordeiro@gmail.com>
>>> ---
>>>  drivers/staging/media/omap4iss/iss.h | 8 --------
>>>  1 file changed, 8 deletions(-)
>>>
>>> diff --git a/drivers/staging/media/omap4iss/iss.h
>>> b/drivers/staging/media/omap4iss/iss.h
>>> index b88f952..a354d5f 100644
>>> --- a/drivers/staging/media/omap4iss/iss.h
>>> +++ b/drivers/staging/media/omap4iss/iss.h
>>> @@ -29,11 +29,6 @@
>>>  
>>>  struct regmap;
>>>  
>>> -#define to_iss_device(ptr_module)                              \
>>> -       container_of(ptr_module, struct iss_device, ptr_module)
>>> -#define
>>> to_device(ptr_module)                                          \
>>> -       (to_iss_device(ptr_module)->dev)
>>> -
>>>  enum iss_mem_resources {
>>>         OMAP4_ISS_MEM_TOP,
>>>         OMAP4_ISS_MEM_CSI2_A_REGS1,
>>> @@ -119,9 +114,6 @@ struct iss_device {
>>>         unsigned int isp_subclk_resources;
>>>  };
>>>  
>>> -#define v4l2_dev_to_iss_device(dev) \
>>> -       container_of(dev, struct iss_device, v4l2_dev)
>>> -
>>>  int omap4iss_get_external_info(struct iss_pipeline *pipe,
>>>                                struct media_link *link);
>>>  
>>>
>>
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-14  8:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 13:42 [PATCH] staging: media: omap4iss: Remove unused macro functions Aline Santana Cordeiro
2021-04-12 18:08 ` kernel test robot
2021-04-13 15:06 ` Hans Verkuil
2021-04-13 18:21   ` ascordeiro
2021-04-14  8:02     ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).