1
0
Fork 0
alistair23-linux/drivers/media/platform/xilinx
Mauro Carvalho Chehab cce8ccca80 media: use the BIT() macro
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
	[drivers/media/pci/bt8xx/bttv-input.c:98]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
			...
	[drivers/media/v4l2-core/v4l2-ioctl.c:1391]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour

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 BIT(number) at the header files
with has 1 << 31.

Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> # exynos4-is and s3c-camif
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # omap3isp, vsp1, xilinx, wl128x and ipu3
Reviewed-by: Benoit Parrot <bparrot@ti.com> # am437x and ti-vpe
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-08-26 14:08:50 -03:00
..
Kconfig media: Kconfig files: use the right help coding style 2019-03-20 06:47:51 -04:00
Makefile media: xilinx: Use SPDX-License-Identifier 2018-12-03 13:40:05 -05:00
xilinx-dma.c media: xilinx: set device_caps in struct video_device 2019-07-22 15:08:47 -04:00
xilinx-dma.h media: xilinx: Use SPDX-License-Identifier 2018-12-03 13:40:05 -05:00
xilinx-tpg.c media: Use of_node_name_eq for node name comparisons 2018-12-07 08:28:54 -05:00
xilinx-vip.c media: media/platform: don't set description in ENUM_FMT 2019-07-22 14:43:59 -04:00
xilinx-vip.h media: use the BIT() macro 2019-08-26 14:08:50 -03:00
xilinx-vipp.c media: v4l2-async: Get fwnode reference when putting it to the notifier's list 2019-07-25 08:01:43 -04:00
xilinx-vipp.h media: xilinx: Use SPDX-License-Identifier 2018-12-03 13:40:05 -05:00
xilinx-vtc.c media: xilinx: Use SPDX-License-Identifier 2018-12-03 13:40:05 -05:00
xilinx-vtc.h media: xilinx: Use SPDX-License-Identifier 2018-12-03 13:40:05 -05:00