]> 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>
Wed, 6 Jan 2021 21:21:27 +0000 (16:21 -0500)
commit68df0e4a079bfa0449a93cd8e9c61bd72d1f2b08
tree918ee21d17727fc24275203807725ae0b296d5f8
parent6ec70b706efd2296b521e786c7935bbb4621c7a5
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: 7590017afaac ("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