Re: [PATCH v2] i2c: adv748x: afe: fix sparse warning
On Thu, Mar 8, 2018 at 12:02 AM, Niklas Söderlundwrote: > CC linux-media. > > It's linux-media@vger.kernel.org not linux-me...@vger.kernel.or, sorry > for the noise. > > On 2018-03-07 23:58:16 +0100, Niklas Söderlund wrote: >> This fixes the following sparse warning: >> >> drivers/media/i2c/adv748x/adv748x-afe.c:294:34:expected unsigned int >> [usertype] *signal >> drivers/media/i2c/adv748x/adv748x-afe.c:294:34:got int * >> drivers/media/i2c/adv748x/adv748x-afe.c:294:34: warning: incorrect type in >> argument 2 (different signedness) >> >> Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v2] i2c: adv748x: afe: fix sparse warning
Hi Niklas, Thank you for your patch. On 07/03/18 22:58, Niklas Söderlund wrote: > This fixes the following sparse warning: > > drivers/media/i2c/adv748x/adv748x-afe.c:294:34:expected unsigned int > [usertype] *signal > drivers/media/i2c/adv748x/adv748x-afe.c:294:34:got int * > drivers/media/i2c/adv748x/adv748x-afe.c:294:34: warning: incorrect type in > argument 2 (different signedness) > > Signed-off-by: Niklas SöderlundReviewed-by: Kieran Bingham > --- > > * Changes since v1 > - Use u32 instead of unsigned int as suggested by Geert. > --- > drivers/media/i2c/adv748x/adv748x-afe.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/adv748x/adv748x-afe.c > b/drivers/media/i2c/adv748x/adv748x-afe.c > index 5188178588c9067d..61514bae7e5ceb42 100644 > --- a/drivers/media/i2c/adv748x/adv748x-afe.c > +++ b/drivers/media/i2c/adv748x/adv748x-afe.c > @@ -275,7 +275,8 @@ static int adv748x_afe_s_stream(struct v4l2_subdev *sd, > int enable) > { > struct adv748x_afe *afe = adv748x_sd_to_afe(sd); > struct adv748x_state *state = adv748x_afe_to_state(afe); > - int ret, signal = V4L2_IN_ST_NO_SIGNAL; > + u32 signal = V4L2_IN_ST_NO_SIGNAL; > + int ret; > > mutex_lock(>mutex); > >
Re: [PATCH v2] i2c: adv748x: afe: fix sparse warning
CC linux-media. It's linux-media@vger.kernel.org not linux-me...@vger.kernel.or, sorry for the noise. On 2018-03-07 23:58:16 +0100, Niklas Söderlund wrote: > This fixes the following sparse warning: > > drivers/media/i2c/adv748x/adv748x-afe.c:294:34:expected unsigned int > [usertype] *signal > drivers/media/i2c/adv748x/adv748x-afe.c:294:34:got int * > drivers/media/i2c/adv748x/adv748x-afe.c:294:34: warning: incorrect type in > argument 2 (different signedness) > > Signed-off-by: Niklas Söderlund> > --- > > * Changes since v1 > - Use u32 instead of unsigned int as suggested by Geert. > --- > drivers/media/i2c/adv748x/adv748x-afe.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/adv748x/adv748x-afe.c > b/drivers/media/i2c/adv748x/adv748x-afe.c > index 5188178588c9067d..61514bae7e5ceb42 100644 > --- a/drivers/media/i2c/adv748x/adv748x-afe.c > +++ b/drivers/media/i2c/adv748x/adv748x-afe.c > @@ -275,7 +275,8 @@ static int adv748x_afe_s_stream(struct v4l2_subdev *sd, > int enable) > { > struct adv748x_afe *afe = adv748x_sd_to_afe(sd); > struct adv748x_state *state = adv748x_afe_to_state(afe); > - int ret, signal = V4L2_IN_ST_NO_SIGNAL; > + u32 signal = V4L2_IN_ST_NO_SIGNAL; > + int ret; > > mutex_lock(>mutex); > > -- > 2.16.2 > -- Regards, Niklas Söderlund