drm/amd/display: fix unused variable warning
Subsystems (3)
PATCH 1/1 drm/amd/display: fix unused variable warning
From: Arnd Bergmann <[email protected]>
After all users of the 'dm' warnings got hidden in an #ifdef, the compiler started warning about it being unused:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5380:33: error: unused variable 'dm' [-Werror,-Wunused-variable]
Add another such #ifdef.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
@@ -5377,7 +5377,9 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)struct amdgpu_crtc *acrtc =to_amdgpu_crtc (crtc);struct amdgpu_device *adev =drm_to_adev (crtc->dev);struct dm_crtc_state *acrtc_state =to_dm_crtc_state (crtc->state); +#if defined(CONFIG_DRM_AMD_DC_DCN )struct amdgpu_display_manager *dm = &adev->dm; +#endif int rc =0 ;if (enable) {
Signature · 6 lines
2.29.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
After all users of the 'dm' warnings got hidden in an #ifdef, the compiler started warning about it being unused:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5380:33: error: unused variable 'dm' [-Werror,-Wunused-variable]Add another such #ifdef.
Fixes 98ab5f3513f9 ("drm/amd/display: Fix deadlock during gpu reset v3")Signed-off-by Arnd Bergmann <[email protected]>
Harry
Quoted 10 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable) · line 5385
Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2
-0@@ -5377,7 +5377,9 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)struct amdgpu_crtc *acrtc =to_amdgpu_crtc (crtc);struct amdgpu_device *adev =drm_to_adev (crtc->dev);struct dm_crtc_state *acrtc_state =to_dm_crtc_state (crtc->state); +#if defined(CONFIG_DRM_AMD_DC_DCN )struct amdgpu_display_manager *dm = &adev->dm; +#endif int rc =0 ;if (enable) {
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel