]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix wrongly passed static prefix
authorTakashi Iwai <tiwai@suse.de>
Thu, 28 Nov 2019 08:27:14 +0000 (09:27 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Feb 2020 20:04:38 +0000 (15:04 -0500)
commit84a65b67a5ddeda0f58825059c12cca723b0dc8b
treeec5e2929189a8bad5f05872947cd24dcc19f876f
parent1681bde0fe7f053b6173cc5e913f99b8106deb93
drm/amd/display: Fix wrongly passed static prefix

Currently, gcc spews a warning as:
  drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hubbub.c: In function ‘hubbub1_verify_allow_pstate_change_high’:
  ./include/drm/drm_print.h:316:2: warning: ‘debug_data’ may be used uninitialized in this function [-Wmaybe-uninitialized]

This is because the code checks against a static value although it's
basically a constant and guaranteed to be set.

This patch changes the type prefix from static to const for addressing
the compile warning above and also for letting the compiler optimize
better.

Fixes: 35f83a960e2e ("drm/amd/display: create new files for hubbub functions")
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c