]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Fix compiler warning in drm_atomic_helper.c
authorSean Paul <seanpaul@chromium.org>
Thu, 29 Nov 2018 20:36:48 +0000 (15:36 -0500)
committerSean Paul <seanpaul@chromium.org>
Fri, 30 Nov 2018 15:01:34 +0000 (10:01 -0500)
commitf0c3afb779c5094a2be426532acc06edf3dd1ab3
treebb47af48fa527fb3294992be8105d1082ab2cb0c
parenta546fe25218827ee9a9416db2dde521d0ef5c101
drm: Fix compiler warning in drm_atomic_helper.c

Kbuild was complaining about:
>> drivers/gpu/drm/drm_atomic_helper.c:3169:27: warning: 'state' may be used uninitialized in this function [-Wmaybe-uninitialized]

Now state can't actually be used uninitialized, but we'll assign a value
anyways so it stops bellyaching.

Kbuild config:
link: https://lists.01.org/pipermail/kbuild-all/2018-November/055374.html
tree:   git://anongit.freedesktop.org/drm/drm-misc for-linux-next
head:   9a278fc985bc8f653feace04af4b5d77a7e86ad9
commit: 9a278fc985bc8f653feace04af4b5d77a7e86ad9 [4/4] drm: Add
DRM_MODESET_LOCK_BEGIN/END helpers
config: x86_64-randconfig-x017-201847 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 9a278fc985bc8f653feace04af4b5d77a7e86ad9
# save the attached .config to linux build tree
make ARCH=x86_64

Fixes: 9a278fc985bc ("drm: Add DRM_MODESET_LOCK_BEGIN/END helpers")
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
[seanpaul added extra details on airlied's suggestion]
Link: https://patchwork.freedesktop.org/patch/msgid/20181129203652.223634-1-sean@poorly.run
drivers/gpu/drm/drm_atomic_helper.c