kernel-fxtec-pro1x/drivers/staging
Arnd Bergmann 2dacea4723 media: imx: work around false-positive warning, again
[ Upstream commit 8d1a4817cce1b15b4909f0e324a4f5af5952da67 ]

A warning that I thought to be solved by a previous patch of mine
has resurfaced with gcc-8:

media/imx/imx-media-csi.c: In function 'csi_link_validate':
media/imx/imx-media-csi.c:1025:20: error: 'upstream_ep' may be used uninitialized in this function [-Werror=maybe-uninitialized]
media/imx/imx-media-csi.c:1026:24: error: 'upstream_ep.bus_type' may be used uninitialized in this function [-Werror=maybe-uninitialized]
media/imx/imx-media-csi.c:127:19: error: 'upstream_ep.bus.parallel.bus_width' may be used uninitialized in this function [-Werror=maybe-uninitialized]
media/imx/imx-media-csi.c: In function 'csi_enum_mbus_code':
media/imx/imx-media-csi.c:132:9: error: '*((void *)&upstream_ep+12)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
media/imx/imx-media-csi.c:132:48: error: 'upstream_ep.bus.parallel.bus_width' may be used uninitialized in this function [-Werror=maybe-uninitialized]

I spent some more time digging in this time, and think I have a better
fix, bailing out of the function that either initializes or errors
out here, which simplifies the code enough for gcc to figure out
what is going on. The earlier partial workaround can be removed now,
as the new workaround is better.

Fixes: 890f27693f ("media: imx: work around false-positive warning")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-20 18:47:16 +01:00
..
android
axis-fifo
board
clocking-wizard
comedi
dgnc
emxx_udc
erofs
fbtft
fsl-dpaa2
fwserial
gasket
gdm724x
goldfish
greybus
gs_fpgaboot
iio
ks7010
media media: imx: work around false-positive warning, again 2019-11-20 18:47:16 +01:00
most
mt29f_spinand
mt7621-dma
mt7621-dts
mt7621-eth
mt7621-mmc
mt7621-pci
mt7621-pinctrl staging: mt7621-pinctrl: use pinconf-generic for 'dt_node_to_map' and 'dt_free_map' 2019-11-06 13:05:27 +01:00
mt7621-spi
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433
rtl8188eu staging: rtl8188eu: fix null dereference when kzalloc fails 2019-11-06 13:05:45 +01:00
rtl8192e
rtl8192u
rtl8712
rtl8723bs
rtlwifi
rts5208
sm750fb
speakup
unisys
vboxvideo
vc04_services
vme
vt6655
vt6656
wilc1000
wlan-ng
xgifb
Kconfig
Makefile