linux-brain/drivers/media/i2c/adv748x
Gustavo A. R. Silva d15a2930f6 media: i2c: adv748x: Fix unsafe macros
commit 0d962e061abcf1b9105f88fb850158b5887fbca3 upstream.

Enclose multiple macro parameters in parentheses in order to
make such macros safer and fix the Clang warning below:

drivers/media/i2c/adv748x/adv748x-afe.c:452:12: warning: operator '?:'
has lower precedence than '|'; '|' will be evaluated first
[-Wbitwise-conditional-parentheses]

ret = sdp_clrset(state, ADV748X_SDP_FRP, ADV748X_SDP_FRP_MASK, enable
? ctrl->val - 1 : 0);

Fixes: 3e89586a64 ("media: i2c: adv748x: add adv748x driver")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-14 16:34:18 -05:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
adv748x-afe.c media: adv748x: Store the TX sink in HDMI/AFE 2019-02-18 11:03:52 -05:00
adv748x-core.c Merge branch 'i2c/for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-09-24 16:48:02 -07:00
adv748x-csi2.c media: adv748x: Store the TX sink in HDMI/AFE 2019-02-18 11:03:52 -05:00
adv748x-hdmi.c media: adv748x: Store the TX sink in HDMI/AFE 2019-02-18 11:03:52 -05:00
adv748x.h media: i2c: adv748x: Fix unsafe macros 2020-02-14 16:34:18 -05:00