Re: [PATCH v2 5/7] media: use the BIT() macro

2019-08-23 Thread Laurent Pinchart
Hi Mauro, Thank you for the patch. On Fri, Aug 23, 2019 at 06:47:30AM -0300, Mauro Carvalho Chehab wrote: > As warned by cppcheck: > > [drivers/media/dvb-frontends/cx24123.c:434]: (error) Shifting signed > 32-bit value by 31 bits is undefined behaviour >

Re: [PATCH v2 5/7] media: use the BIT() macro

2019-08-23 Thread Benoit Parrot
Mauro Carvalho Chehab wrote on Fri [2019-Aug-23 06:47:30 -0300]: > As warned by cppcheck: > > [drivers/media/dvb-frontends/cx24123.c:434]: (error) Shifting signed > 32-bit value by 31 bits is undefined behaviour > [drivers/media/pci/bt8xx/bttv-input.c:87]: (error) Shifting signed

Re: [PATCH v2 5/7] media: use the BIT() macro

2019-08-23 Thread Sylwester Nawrocki
On 8/23/19 11:47, Mauro Carvalho Chehab wrote: > There are lots of places where we're doing 1 << 31. That's bad, > as, depending on the architecture, this has an undefined behavior. > > The BIT() macro is already prepared to handle this, so, let's > just switch all "1 << number" macros by

[PATCH v2 5/7] media: use the BIT() macro

2019-08-23 Thread Mauro Carvalho Chehab
As warned by cppcheck: [drivers/media/dvb-frontends/cx24123.c:434]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour [drivers/media/pci/bt8xx/bttv-input.c:87]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour