Re: [PATCH v2 01/18] media: i2c: rdamc21: Fix warning on u8 cast

2021-03-15 Thread Laurent Pinchart
Hi Jacopo, Thank you for the patch. On Mon, Mar 15, 2021 at 02:14:55PM +0100, Jacopo Mondi wrote: > Sparse reports a warning on a cast to u8 of a 16 bits constant. > > drivers/media/i2c/rdacm21.c:348:62: warning: cast truncates bits > from constant value (300a becomes a) > > Even if the behavio

Re: [PATCH v2 01/18] media: i2c: rdamc21: Fix warning on u8 cast

2021-03-15 Thread Kieran Bingham
Hi Jacopo, On 15/03/2021 13:14, Jacopo Mondi wrote: > Sparse reports a warning on a cast to u8 of a 16 bits constant. > > drivers/media/i2c/rdacm21.c:348:62: warning: cast truncates bits > from constant value (300a becomes a) > > Even if the behaviour is intended, silence the sparse warning repl

[PATCH v2 01/18] media: i2c: rdamc21: Fix warning on u8 cast

2021-03-15 Thread Jacopo Mondi
Sparse reports a warning on a cast to u8 of a 16 bits constant. drivers/media/i2c/rdacm21.c:348:62: warning: cast truncates bits from constant value (300a becomes a) Even if the behaviour is intended, silence the sparse warning replacing the cast with a bitwise & operation. Reported-by: Hans Ver