public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] mt9v111: Fix compiler warning by initialising a variable
@ 2018-07-30  7:26 Sakari Ailus
  2018-07-30  7:51 ` jacopo mondi
  0 siblings, 1 reply; 3+ messages in thread
From: Sakari Ailus @ 2018-07-30  7:26 UTC (permalink / raw)
  To: linux-media; +Cc: jacopo

While this isn't a bug, initialise the variable to quash the warning.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/i2c/mt9v111.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index da8f6ab91307..58d5f2224bff 100644
--- a/drivers/media/i2c/mt9v111.c
+++ b/drivers/media/i2c/mt9v111.c
@@ -884,7 +884,7 @@ static int mt9v111_set_format(struct v4l2_subdev *subdev,
 	struct v4l2_mbus_framefmt new_fmt;
 	struct v4l2_mbus_framefmt *__fmt;
 	unsigned int best_fit = ~0L;
-	unsigned int idx;
+	unsigned int idx = 0;
 	unsigned int i;
 
 	mutex_lock(&mt9v111->stream_mutex);
-- 
2.11.0

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

* Re: [PATCH 1/1] mt9v111: Fix compiler warning by initialising a variable
  2018-07-30  7:26 [PATCH 1/1] mt9v111: Fix compiler warning by initialising a variable Sakari Ailus
@ 2018-07-30  7:51 ` jacopo mondi
  2018-07-30  8:04   ` Sakari Ailus
  0 siblings, 1 reply; 3+ messages in thread
From: jacopo mondi @ 2018-07-30  7:51 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media

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

Hi Sakari,

On Mon, Jul 30, 2018 at 10:26:27AM +0300, Sakari Ailus wrote:
> While this isn't a bug, initialise the variable to quash the warning.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/media/i2c/mt9v111.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
> index da8f6ab91307..58d5f2224bff 100644
> --- a/drivers/media/i2c/mt9v111.c
> +++ b/drivers/media/i2c/mt9v111.c
> @@ -884,7 +884,7 @@ static int mt9v111_set_format(struct v4l2_subdev *subdev,
>  	struct v4l2_mbus_framefmt new_fmt;
>  	struct v4l2_mbus_framefmt *__fmt;
>  	unsigned int best_fit = ~0L;
> -	unsigned int idx;
> +	unsigned int idx = 0;
>  	unsigned int i;
>

Thanks for this, but there is already a patch sent on Friday by Jasmin
addressing the warning

https://patchwork.kernel.org/patch/10547983/

>  	mutex_lock(&mt9v111->stream_mutex);
> --
> 2.11.0
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/1] mt9v111: Fix compiler warning by initialising a variable
  2018-07-30  7:51 ` jacopo mondi
@ 2018-07-30  8:04   ` Sakari Ailus
  0 siblings, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2018-07-30  8:04 UTC (permalink / raw)
  To: jacopo mondi; +Cc: linux-media

On Mon, Jul 30, 2018 at 09:51:25AM +0200, jacopo mondi wrote:
> Hi Sakari,
> 
> On Mon, Jul 30, 2018 at 10:26:27AM +0300, Sakari Ailus wrote:
> > While this isn't a bug, initialise the variable to quash the warning.
> >
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > ---
> >  drivers/media/i2c/mt9v111.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
> > index da8f6ab91307..58d5f2224bff 100644
> > --- a/drivers/media/i2c/mt9v111.c
> > +++ b/drivers/media/i2c/mt9v111.c
> > @@ -884,7 +884,7 @@ static int mt9v111_set_format(struct v4l2_subdev *subdev,
> >  	struct v4l2_mbus_framefmt new_fmt;
> >  	struct v4l2_mbus_framefmt *__fmt;
> >  	unsigned int best_fit = ~0L;
> > -	unsigned int idx;
> > +	unsigned int idx = 0;
> >  	unsigned int i;
> >
> 
> Thanks for this, but there is already a patch sent on Friday by Jasmin
> addressing the warning
> 
> https://patchwork.kernel.org/patch/10547983/

Ah, ok. I'll mark this as rejected then.

-- 
Sakari Ailus
sakari.ailus@linux.intel.com

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

end of thread, other threads:[~2018-07-30  9:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30  7:26 [PATCH 1/1] mt9v111: Fix compiler warning by initialising a variable Sakari Ailus
2018-07-30  7:51 ` jacopo mondi
2018-07-30  8:04   ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox