<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);">
Series is:</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> Quan, Evan <Evan.Quan@amd.com><br>
<b>Sent:</b> Tuesday, October 27, 2020 10:45 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Quan, Evan <Evan.Quan@amd.com>; kernel test robot <lkp@intel.com><br>
<b>Subject:</b> [PATCH 2/2] drm/amd/pm: fix compile warnings about variable used uninitialized</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Fix the compile warnings below:<br>
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1743:13: warning: variable 'min' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]<br>
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1743:13: warning: variable 'max' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]<br>
<br>
Change-Id: Id2dece80162cd10f004abbf3b62cba0c84e988f2<br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
Reported-by: kernel test robot <lkp@intel.com><br>
---<br>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 5 ++---<br>
1 file changed, 2 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c<br>
index 49db61a89505..5937150e6b37 100644<br>
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c<br>
@@ -1856,7 +1856,7 @@ static int smu7_calculate_ro_range(struct pp_hwmgr *hwmgr)<br>
{<br>
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);<br>
struct amdgpu_device *adev = hwmgr->adev;<br>
- uint32_t asicrev1, evv_revision, max, min;<br>
+ uint32_t asicrev1, evv_revision, max = 0, min = 0;<br>
<br>
atomctrl_read_efuse(hwmgr, STRAP_EVV_REVISION_LSB, STRAP_EVV_REVISION_MSB,<br>
&evv_revision);<br>
@@ -1893,8 +1893,7 @@ static int smu7_calculate_ro_range(struct pp_hwmgr *hwmgr)<br>
max = 2500;<br>
}<br>
}<br>
- } else if ((hwmgr->chip_id == CHIP_POLARIS11) ||<br>
- (hwmgr->chip_id == CHIP_POLARIS12)) {<br>
+ } else {<br>
min = 1100;<br>
max = 2100;<br>
}<br>
-- <br>
2.29.0<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>