android_kernel_sony_sdm845/include/media
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nathan Chancellor 39919a2ac1 media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros
[ Upstream commit afb34781620274236bd9fc9246e22f6963ef5262 ]

When building with Clang + -Wtautological-constant-compare, several of
the ivtv and cx18 drivers warn along the lines of:

 drivers/media/pci/cx18/cx18-driver.c:1005:21: warning: converting the
 result of '<<' to a boolean always evaluates to true
 [-Wtautological-constant-compare]
                         cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL,
                                         ^
 drivers/media/pci/cx18/cx18-cards.h:18:37: note: expanded from macro
 'CX18_HW_GPIO_RESET_CTRL'
 #define CX18_HW_GPIO_RESET_CTRL         (1 << 6)
                                           ^
 1 warning generated.

This warning happens because the shift operation is implicitly converted
to a boolean in v4l2_device_mask_call_all before being negated. This can
be solved by just comparing the mask result to 0 explicitly so that
there is no boolean conversion. The ultimate goal is to enable
-Wtautological-compare globally because there are several subwarnings
that would be helpful to have.

For visual consistency and avoidance of these warnings in the future,
all of the implicitly boolean conversions in the v4l2_device macros
are converted to explicit ones as well.

Link: https://github.com/ClangBuiltLinux/linux/issues/752

Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-28 15:42:24 +01:00
..
blackfin
davinci media: davinci/vpbe: array underflow in vpbe_enum_outputs() 2020-01-29 10:24:24 +01:00
drv-intf [media] soc-camera/sh_mobile_csi2: remove unused driver 2016-08-24 06:35:19 -03:00
i2c [media] smiapp: Remove set_xclk() callback from hwconfig 2016-09-05 15:53:20 -03:00
cec-edid.h [media] cec-edid: add module for EDID CEC helper functions 2016-06-28 09:45:51 -03:00
cec.h [media] cec: rename cec_devnode fhs_lock to just lock 2016-08-22 13:09:06 -03:00
i2c-addr.h
lirc.h [media] bz#75751: Move internal header file lirc.h to uapi/ 2015-11-17 06:47:43 -02:00
lirc_dev.h [media] doc-rst: Fix issues with RC documentation 2016-07-17 14:02:43 -03:00
media-device.h [media] media: Move media_device link_notify operation to an ops structure 2016-09-09 11:20:09 -03:00
media-devnode.h [media] mc-core.rst: fix a warning about an internal routine 2016-09-09 09:59:12 -03:00
media-entity.h [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
rc-core.h [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
rc-map.h [media] rc: split nec protocol into its three variants 2016-09-22 11:46:49 -03:00
rcar-fcp.h [media] v4l: rcar-fcp: Don't force users to check for disabled FCP support 2016-09-09 11:29:57 -03:00
soc_camera.h [media] v4l2: remove g/s_crop from video ops 2016-08-24 09:46:09 -03:00
tuner-types.h [media] doc-rst: Fix conversion for v4l2 core functions 2016-07-17 14:02:43 -03:00
tuner.h [media] v4l2-mc.h: move tuner PAD definitions to this new header 2016-02-01 07:19:44 -02:00
tveeprom.h [media] doc-rst: Fix conversion for v4l2 core functions 2016-07-17 14:02:43 -03:00
v4l2-async.h [media] v4l2-async: document the remaining stuff 2016-07-23 08:04:21 -03:00
v4l2-clk.h [media] v4l2-clk: add new definition: V4L2_CLK_NAME_SIZE 2015-11-17 15:19:11 -02:00
v4l2-common.h [media] v4l2-common.h: Add documentation for other functions 2016-07-23 08:04:21 -03:00
v4l2-ctrls.h [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
v4l2-dev.h [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
v4l2-device.h media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros 2020-02-28 15:42:24 +01:00
v4l2-dv-timings.h [media] v4l2-dv-timings.h: let kernel-doc parte the typedef argument 2016-09-09 09:44:14 -03:00
v4l2-event.h [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
v4l2-fh.h media: v4l: event: Prevent freeing event subscriptions while accessed 2018-10-03 17:01:55 -07:00
v4l2-flash-led-class.h [media] v4l2-flash-led-class.h: document v4l2_flash_ops 2016-09-09 10:19:35 -03:00
v4l2-image-sizes.h
v4l2-ioctl.h [media] v4l2-ioctl.h: document the remaining functions 2016-09-09 09:38:36 -03:00
v4l2-mc.h [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
v4l2-mediabus.h [media] v4l2-mediabus: Add to DocBook 2015-08-22 09:05:55 -03:00
v4l2-mem2mem.h [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
v4l2-of.h [media] v4l2-of: fix compiler errors if CONFIG_OF is undefined 2015-04-28 08:33:45 -03:00
v4l2-rect.h media: v4l2-rect.h: fix v4l2_rect_map_inside() top/left adjustments 2020-02-14 16:31:00 -05:00
v4l2-subdev.h [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
v4l2-tpg-colors.h [media] tpg: Export the tpg code from vivid as a module 2016-04-20 16:14:39 -03:00
v4l2-tpg.h [media] tpg: Export the tpg code from vivid as a module 2016-04-20 16:14:39 -03:00
videobuf-core.h treewide: fix typos in comment blocks 2015-08-07 14:46:24 +02:00
videobuf-dma-contig.h
videobuf-dma-sg.h
videobuf-dvb.h
videobuf-vmalloc.h
videobuf2-core.h [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
videobuf2-dma-contig.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
videobuf2-dma-sg.h [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
videobuf2-dvb.h [media] add media controller support to videobuf2-dvb 2016-02-10 07:23:41 -02:00
videobuf2-memops.h [media] media: videobuf2: Replace videobuf2-core with videobuf2-v4l2 2015-10-01 08:48:18 -03:00
videobuf2-v4l2.h [media] videobuf2-v4l2: document two helper functions 2016-09-09 10:19:06 -03:00
videobuf2-vmalloc.h [media] media: videobuf2: Replace videobuf2-core with videobuf2-v4l2 2015-10-01 08:48:18 -03:00
vsp1.h [media] v4l: vsp1: Fix tri-planar format support through DRM API 2016-09-09 11:32:19 -03:00