]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix unused variable warning
authorArnd Bergmann <arnd@arndb.de>
Sun, 3 Jan 2021 14:02:32 +0000 (15:02 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Jan 2021 16:34:23 +0000 (11:34 -0500)
commitda505c350f1ddee9419161a3b1b1ac4d481b1120
tree5ccd31111a9387e00833d02b9b7412e6f454a2f5
parentd378f5a87c136c2401dd98524f80961bf7f0a059
drm/amd/display: Fix unused variable warning

Some of the newly added code is hidden inside of #ifdef
blocks, but one variable is unused when debugfs is disabled:

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8370:8: error: unused variable 'configure_crc' [-Werror,-Wunused-variable]

Change the #ifdef to an if(IS_ENABLED()) check to fix the warning
and avoid adding more #ifdefs.

Fixes: 44b2e988ce42 ("drm/amd/display: Expose new CRC window property")
Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h