]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: work around false-positive maybe-uninitialized warning
authorArnd Bergmann <arnd@arndb.de>
Wed, 27 May 2020 14:05:09 +0000 (16:05 +0200)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 27 May 2020 16:07:44 +0000 (17:07 +0100)
commitff010a3d69c0f44f343ead65a818df814e34e988
tree2a8d25286f42c4d1616cc027a342551ce18d6957
parent1ea138947222fb05102d5da6add6b51d3d55ecb9
drm/i915: work around false-positive maybe-uninitialized warning

gcc-9 gets confused by the code flow in check_dirty_whitelist:

drivers/gpu/drm/i915/gt/selftest_workarounds.c: In function 'check_dirty_whitelist':
drivers/gpu/drm/i915/gt/selftest_workarounds.c:492:17: error: 'rsvd' may be used uninitialized in this function [-Werror=maybe-uninitialized]

I could not figure out a good way to do this in a way that gcc
understands better, so initialize the variable to zero, as last
resort.

Fixes: 61507b59f931 ("drm/i915: Implement read-only support in whitelist selftest")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200527140526.1458215-2-arnd@arndb.de
drivers/gpu/drm/i915/gt/selftest_workarounds.c