linux/include/media
Arnd Bergmann da48c948c2 media: fix warning on v4l2_subdev_call() result interpreted as bool
v4l2_subdev_call is a macro returning whatever the callback return
type is, usually 'int'. With gcc-7 and ccache, this can lead to
many wanings like:

media/platform/pxa_camera.c: In function 'pxa_mbus_build_fmts_xlate':
media/platform/pxa_camera.c:766:27: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context]
  while (!v4l2_subdev_call(subdev, pad, enum_mbus_code, NULL, &code)) {
media/atomisp/pci/atomisp2/atomisp_cmd.c: In function 'atomisp_s_ae_window':
media/atomisp/pci/atomisp2/atomisp_cmd.c:6414:52: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context]
  if (v4l2_subdev_call(isp->inputs[asd->input_curr].camera,

The problem here is that after preprocessing, we the compiler
sees a variation of

	if (a ? 0 : 2)

that it thinks is suspicious.

This replaces the ?: operator with an different expression that
does the same thing in a more easily readable way that cannot
tigger the warning

Link: https://lkml.org/lkml/2017/7/14/156

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-26 13:43:17 -04:00
..
blackfin [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
davinci media: platform: davinci: drop VPFE_CMD_S_CCDC_RAW_PARAMS 2017-07-20 15:56:32 -04:00
drv-intf [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
i2c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
cec-notifier.h media: cec: move cec_register_cec_notifier to cec-notifier.h 2017-07-18 13:00:01 -03:00
cec-pin.h media: cec-pin: add low-level pin hardware support 2017-07-18 12:57:18 -03:00
cec.h media: cec: move cec_register_cec_notifier to cec-notifier.h 2017-07-18 13:00:01 -03:00
i2c-addr.h V4L/DVB (9940): bt832: remove this driver 2008-12-30 09:39:25 -02:00
imx.h [media] media: Add i.MX media core driver 2017-06-20 07:30:38 -03:00
lirc_dev.h [media] lirc_dev: cleanup header 2017-06-06 09:07:26 -03:00
lirc.h [media] bz#75751: Move internal header file lirc.h to uapi/ 2015-11-17 06:47:43 -02:00
media-device.h [media] media: Protect enable_source and disable_source handler code paths 2017-02-03 07:39:35 -02:00
media-devnode.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
media-entity.h media: Make parameter of media_entity_remote_pad() const 2017-07-20 16:54:04 -04:00
rc-core.h [media] rc-core: cleanup rc_register_device pt2 2017-06-13 13:55:01 -03:00
rc-map.h [media] mce_kbd: add encoder 2017-03-24 08:24:41 -03:00
rcar-fcp.h v4l: rcar-fcp: Add an API to retrieve the FCP device 2017-06-09 12:25:36 +01:00
soc_camera.h [media] v4l: soc-camera: Remove videobuf1 support 2017-03-22 11:27:24 -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] tveeprom: get rid of documentation of an unused parameter 2017-04-05 15:37:06 -03:00
v4l2-async.h [media] v4l: Switch from V4L2 OF not V4L2 fwnode API 2017-06-06 09:58:16 -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: add a debug macro to be used with dev_foo() 2016-11-18 10:04:58 -02:00
v4l2-ctrls.h [media] v4l2-ctrls.c: Implement unlocked variant of v4l2_ctrl_handler_setup() 2017-06-07 08:38:12 -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: fix some doc tags 2016-09-09 09:41:12 -03:00
v4l2-dv-timings.h [media] v4l2-dv-timings: add helpers for vic and pixelaspect ratio 2016-11-16 15:20:03 -02:00
v4l2-event.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
v4l2-fh.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
v4l2-flash-led-class.h media: v4l2-flash: Use led_classdev instead of led_classdev_flash for indicator 2017-07-26 08:40:28 -04:00
v4l2-fwnode.h media: v4l2-fwnode: fix a Sphinx warning 2017-07-21 08:03:24 -04:00
v4l2-image-sizes.h [media] media: v4l2-image-sizes.h: correct the SVGA height definition 2014-12-04 13:56:56 -02:00
v4l2-ioctl.h [media] v4l: Add metadata buffer type and format 2017-04-14 22:37:02 -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 helper functions 2017-07-20 06:54:35 -04:00
v4l2-mem2mem.h [media] media: v4l2-mem2mem: extend m2m APIs for more accurate buffer management 2017-06-20 08:53:39 -03:00
v4l2-rect.h [media] v4l2-rect.h: new header with struct v4l2_rect helper functions 2016-04-20 16:11:33 -03:00
v4l2-subdev.h media: fix warning on v4l2_subdev_call() result interpreted as bool 2017-07-26 13:43:17 -04: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] vivid: Add support for HSV encoding 2016-10-21 15:54:16 -02:00
videobuf2-core.h [media] vb2: Fix queue_setup() callback description 2017-04-05 15:11:07 -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] vb2: convert vb2_vmarea_handler refcount from atomic_t to refcount_t 2017-04-05 15:31:57 -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
videobuf-core.h treewide: fix typos in comment blocks 2015-08-07 14:46:24 +02:00
videobuf-dma-contig.h [media] videobuf-dma-contig: remove support for cached mem 2013-04-25 09:50:19 -03:00
videobuf-dma-sg.h [media] videobuf: make unused exported functions static 2015-01-27 10:01:33 -02:00
videobuf-dvb.h [media] media: remove emacs editor variables 2014-12-22 17:52:20 -02:00
videobuf-vmalloc.h V4L/DVB: videobuf: add ext_lock argument to the queue init functions 2010-10-21 01:06:14 -02:00
vsp1.h v4l: vsp1: Add API to map and unmap DRM buffers through the VSP 2017-06-09 12:25:38 +01:00