All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: atomisp: pci: remove unneeded variable 'err'
@ 2021-04-18 14:43 Saurav Girepunje
  2021-04-18 15:07 ` Fabio Aiuto
  0 siblings, 1 reply; 3+ messages in thread
From: Saurav Girepunje @ 2021-04-18 14:43 UTC (permalink / raw)
  To: mchehab, sakari.ailus, gregkh, saurav.girepunje, linux-media,
	linux-staging, linux-kernel
  Cc: saurav.girepunje

Fix the following coccicheck warning:

drivers/staging/media/atomisp/pci/sh_css_mipi.c:39:5-8:
Unneeded variable: "err". Return "0" on line 44

Signed-off-by: Saurav Girepunje <saurav.girepunje@google.com>
---
 drivers/staging/media/atomisp/pci/sh_css_mipi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/sh_css_mipi.c b/drivers/staging/media/atomisp/pci/sh_css_mipi.c
index d5ae7f0b5864..708903a31b08 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_mipi.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_mipi.c
@@ -36,12 +36,11 @@ ref_count_mipi_allocation[N_CSI_PORTS]; /* Initialized in mipi_init */
 int
 ia_css_mipi_frame_specify(const unsigned int size_mem_words,
 			  const bool contiguous) {
-	int err = 0;
 
 	my_css.size_mem_words = size_mem_words;
 	(void)contiguous;
 
-	return err;
+	return 0;
 }
 
 /*
-- 
2.25.1


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

* Re: [PATCH] media: atomisp: pci: remove unneeded variable 'err'
  2021-04-18 14:43 [PATCH] media: atomisp: pci: remove unneeded variable 'err' Saurav Girepunje
@ 2021-04-18 15:07 ` Fabio Aiuto
  2021-04-28  4:54   ` [PATCH] media: atomisp: pci: remove unneeded variable 'err'akari.ailus@linux.intel.com, SAURAV GIREPUNJE
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Aiuto @ 2021-04-18 15:07 UTC (permalink / raw)
  To: Saurav Girepunje
  Cc: mchehab, sakari.ailus, gregkh, saurav.girepunje, linux-media,
	linux-staging, linux-kernel, saurav.girepunje

On Sun, Apr 18, 2021 at 08:13:23PM +0530, Saurav Girepunje wrote:
> Fix the following coccicheck warning:
> 
> drivers/staging/media/atomisp/pci/sh_css_mipi.c:39:5-8:
> Unneeded variable: "err". Return "0" on line 44
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@google.com>
> ---
>  drivers/staging/media/atomisp/pci/sh_css_mipi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/sh_css_mipi.c b/drivers/staging/media/atomisp/pci/sh_css_mipi.c
> index d5ae7f0b5864..708903a31b08 100644
> --- a/drivers/staging/media/atomisp/pci/sh_css_mipi.c
> +++ b/drivers/staging/media/atomisp/pci/sh_css_mipi.c
> @@ -36,12 +36,11 @@ ref_count_mipi_allocation[N_CSI_PORTS]; /* Initialized in mipi_init */
>  int
>  ia_css_mipi_frame_specify(const unsigned int size_mem_words,
>  			  const bool contiguous) {
> -	int err = 0;
>  
>  	my_css.size_mem_words = size_mem_words;
>  	(void)contiguous;
>  
> -	return err;
> +	return 0;
>  }
>  
>  /*
> -- 
> 2.25.1
> 
> 

Hi Saurav,

this ia_css_mipi_frame_specify seems to be unused. On
header file, before the prototype it is said that it could
be removed only when all drivers moved to a new API.

Is that comment obsolete?

thank you,

fabio

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

* Re: [PATCH] media: atomisp: pci: remove unneeded variable 'err'akari.ailus@linux.intel.com,
  2021-04-18 15:07 ` Fabio Aiuto
@ 2021-04-28  4:54   ` SAURAV GIREPUNJE
  0 siblings, 0 replies; 3+ messages in thread
From: SAURAV GIREPUNJE @ 2021-04-28  4:54 UTC (permalink / raw)
  To: Fabio Aiuto
  Cc: mchehab, sakari.ailus, gregkh, saurav.girepunje, linux-media,
	linux-staging, linux-kernel, saurav.girepunje

On Sun, Apr 18, 2021 at 05:07:09PM +0200, Fabio Aiuto wrote:
> On Sun, Apr 18, 2021 at 08:13:23PM +0530, Saurav Girepunje wrote:
> > Fix the following coccicheck warning:
> > 
> > drivers/staging/media/atomisp/pci/sh_css_mipi.c:39:5-8:
> > Unneeded variable: "err". Return "0" on line 44
> > 
> > Signed-off-by: Saurav Girepunje <saurav.girepunje@google.com>
> > ---
> >  drivers/staging/media/atomisp/pci/sh_css_mipi.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/media/atomisp/pci/sh_css_mipi.c b/drivers/staging/media/atomisp/pci/sh_css_mipi.c
> > index d5ae7f0b5864..708903a31b08 100644
> > --- a/drivers/staging/media/atomisp/pci/sh_css_mipi.c
> > +++ b/drivers/staging/media/atomisp/pci/sh_css_mipi.c
> > @@ -36,12 +36,11 @@ ref_count_mipi_allocation[N_CSI_PORTS]; /* Initialized in mipi_init */
> >  int
> >  ia_css_mipi_frame_specify(const unsigned int size_mem_words,
> >  			  const bool contiguous) {
> > -	int err = 0;
> >  
> >  	my_css.size_mem_words = size_mem_words;
> >  	(void)contiguous;
> >  
> > -	return err;
> > +	return 0;
> >  }
> >  
> >  /*
> > -- 
> > 2.25.1
> > 
> > 
> 
> Hi Saurav,
> 
> this ia_css_mipi_frame_specify seems to be unused. On
> header file, before the prototype it is said that it could
> be removed only when all drivers moved to a new API.
> 
> Is that comment obsolete?
> 
> thank you,
> 
> fabio

yes this ia_css_mipi_frame_specify is unused. On header file 

/* Backward compatible for CSS API 2.0 only
 * TO BE REMOVED when all drivers move to CSS API 2.1.
 */

 deprecated{Use ia_css_mipi_buffer_config instead.}

new api also suggested on comment.

saurav

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

end of thread, other threads:[~2021-04-28  4:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-18 14:43 [PATCH] media: atomisp: pci: remove unneeded variable 'err' Saurav Girepunje
2021-04-18 15:07 ` Fabio Aiuto
2021-04-28  4:54   ` [PATCH] media: atomisp: pci: remove unneeded variable 'err'akari.ailus@linux.intel.com, SAURAV GIREPUNJE

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.