<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:11pt;color:#0078D7;margin:5pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Wei Yongjun <weiyongjun1@huawei.com><br>
<b>Sent:</b> Wednesday, February 24, 2021 4:49 AM<br>
<b>To:</b> Hulk Robot <hulkci@huawei.com>; Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; David Airlie <airlied@linux.ie>; Daniel
Vetter <daniel@ffwll.ch>; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>;
Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>; Simon Ser <contact@emersion.fr>; Zhuo, Qingqing <Qingqing.Zhuo@amd.com><br>
<b>Cc:</b> Wei Yongjun <weiyongjun1@huawei.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org><br>
<b>Subject:</b> [PATCH -next] drm/amd/display: Fix unused variable warning</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">GCC reports the following warning with W=1:<br>
<br>
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5439:33:<br>
warning: unused variable 'dm' [-Wunused-variable]<br>
5439 | struct amdgpu_display_manager *dm = &adev->dm;<br>
| ^~<br>
<br>
This variable only used when CONFIG_DRM_AMD_DC_DCN is set, this<br>
commit fix the warning.<br>
<br>
Reported-by: Hulk Robot <hulkci@huawei.com><br>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com><br>
---<br>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
index e24a13fd2730..bda8d5f4e56a 100644<br>
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
@@ -5436,8 +5436,8 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)<br>
struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);<br>
struct amdgpu_device *adev = drm_to_adev(crtc->dev);<br>
struct dm_crtc_state *acrtc_state = to_dm_crtc_state(crtc->state);<br>
- struct amdgpu_display_manager *dm = &adev->dm;<br>
#if defined(CONFIG_DRM_AMD_DC_DCN)<br>
+ struct amdgpu_display_manager *dm = &adev->dm;<br>
unsigned long flags;<br>
#endif<br>
int rc = 0;<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>