<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:"Times New Roman",serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<p style="font-family:Arial;font-size:10pt;color:#008000;margin:15pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div class="WordSection1">
<div>
<p class="MsoNormal">+ Srinath, Tim<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div id="ms-outlook-mobile-signature">
<p class="MsoNormal">Get <a href="https://aka.ms/AAb9ysg">Outlook for Android</a><o:p></o:p></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> SHANMUGAM, SRINIVASAN<br>
<b>Sent:</b> Saturday, January 6, 2024 10:06:33 AM<br>
<b>To:</b> Dan Carpenter <dan.carpenter@linaro.org>; Lee, Peyton <Peyton.Lee@amd.com><br>
<b>Cc:</b> dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Subject:</b> RE: [bug report] drm/amdgpu/vpe: enable vpe dpm</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">Hi Dan Carpenter,<br>
<br>
This was fixed in <a href="https://patchwork.freedesktop.org/patch/573477/?series=128249&rev=1">
https://patchwork.freedesktop.org/patch/573477/?series=128249&rev=1</a><br>
<br>
Thank you!<br>
<br>
Regards,<br>
Srini<br>
<br>
-----Original Message-----<br>
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Dan Carpenter<br>
Sent: Friday, January 5, 2024 7:04 PM<br>
To: Lee, Peyton <Peyton.Lee@amd.com><br>
Cc: dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org<br>
Subject: [bug report] drm/amdgpu/vpe: enable vpe dpm<br>
<br>
Hello Peyton Lee,<br>
<br>
The patch 5f82a0c90cca: "drm/amdgpu/vpe: enable vpe dpm" from Dec 12,<br>
2023 (linux-next), leads to the following Smatch static checker<br>
warning:<br>
<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:62 vpe_u1_8_from_fraction() warn: unsigned 'numerator' is never less than zero.<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:63 vpe_u1_8_from_fraction() warn: unsigned 'denominator' is never less than zero.<br>
<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c<br>
    60 static uint16_t vpe_u1_8_from_fraction(uint16_t numerator, uint16_t denominator)<br>
    61 {<br>
--> 62         bool arg1_negative = numerator < 0;<br>
    63         bool arg2_negative = denominator < 0;<br>
<br>
uint16_t can't be negative.<br>
<br>
    64 <br>
    65         uint16_t arg1_value = (uint16_t)(arg1_negative ? -numerator : numerator);<br>
    66         uint16_t arg2_value = (uint16_t)(arg2_negative ? -denominator : denominator);<br>
    67 <br>
    68         uint16_t remainder;<br>
    69 <br>
<br>
regards,<br>
dan carpenter<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>