<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:10pt;color:#0078D7;margin:15pt;" 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> Quan, Evan <Evan.Quan@amd.com><br>
<b>Sent:</b> Tuesday, August 25, 2020 11:32 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>; dan.carpenter@oracle.com <dan.carpenter@oracle.com>; Quan, Evan <Evan.Quan@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/pm: suppress static checker warning</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Suppress the warning below:<br>
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:274 phm_check_smc_update_required_for_display_configuration()<br>
warn: signedness bug returning '(-22)'<br>
<br>
Change-Id: If50e39fe401c16d981d917ef7d8d5ea81d6538df<br>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com><br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
---<br>
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c | 5 ++++-<br>
 1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c<br>
index 9454ab50f9a1..1f9b9facdf1f 100644<br>
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c<br>
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/hardwaremanager.c<br>
@@ -271,7 +271,10 @@ int phm_start_thermal_controller(struct pp_hwmgr *hwmgr)<br>
 <br>
 bool phm_check_smc_update_required_for_display_configuration(struct pp_hwmgr *hwmgr)<br>
 {<br>
-       PHM_FUNC_CHECK(hwmgr);<br>
+       if (hwmgr == NULL ||<br>
+           hwmgr->hwmgr_func == NULL)<br>
+               return false;<br>
+<br>
         if (hwmgr->pp_one_vf)<br>
                 return false;<br>
 <br>
-- <br>
2.28.0<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>