[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210224094942.2691246-1-weiyongjun1@huawei.com>
Date: Wed, 24 Feb 2021 09:49:42 +0000
From: Wei Yongjun <weiyongjun1@...wei.com>
To: Hulk Robot <hulkci@...wei.com>,
Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
Aurabindo Pillai <aurabindo.pillai@....com>,
Stylon Wang <stylon.wang@....com>,
Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
"Bas Nieuwenhuizen" <bas@...nieuwenhuizen.nl>,
Simon Ser <contact@...rsion.fr>,
Qingqing Zhuo <qingqing.zhuo@....com>
CC: Wei Yongjun <weiyongjun1@...wei.com>,
<amd-gfx@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH -next] drm/amd/display: Fix unused variable warning
GCC reports the following warning with W=1:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5439:33:
warning: unused variable 'dm' [-Wunused-variable]
5439 | struct amdgpu_display_manager *dm = &adev->dm;
| ^~
This variable only used when CONFIG_DRM_AMD_DC_DCN is set, this
commit fix the warning.
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index e24a13fd2730..bda8d5f4e56a 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5436,8 +5436,8 @@ 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);
- struct amdgpu_display_manager *dm = &adev->dm;
#if defined(CONFIG_DRM_AMD_DC_DCN)
+ struct amdgpu_display_manager *dm = &adev->dm;
unsigned long flags;
#endif
int rc = 0;
Powered by blists - more mailing lists