<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:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
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> Yu, Lang <Lang.Yu@amd.com><br>
<b>Sent:</b> Wednesday, September 6, 2023 7:42 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Gopalakrishnan, Veerabadhran (Veera) <Veerabadhran.Gopalakrishnan@amd.com>; Yu, Lang <Lang.Yu@amd.com>; Dan Carpenter <dan.carpenter@linaro.org><br>
<b>Subject:</b> [PATCH] drm/amdgpu: fix unsigned error codes</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Fixes: 77b13b916728 ("drm/amdgpu: add selftest framework for UMSCH")<br>
<br>
Signed-off-by: Lang Yu <Lang.Yu@amd.com><br>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org><br>
Link: <a href="https://lore.kernel.org/all/ZPhddADtKmOuVyDq@lang-desktop">https://lore.kernel.org/all/ZPhddADtKmOuVyDq@lang-desktop</a><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 7 +++----<br>
1 file changed, 3 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c<br>
index 284643e1efeb..9da80b54d63e 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c<br>
@@ -335,11 +335,10 @@ static int setup_umsch_mm_test(struct amdgpu_device *adev,<br>
if (r)<br>
goto error_free_vm;<br>
<br>
- test->pasid = amdgpu_pasid_alloc(16);<br>
- if (test->pasid < 0) {<br>
- r = test->pasid;<br>
+ r = amdgpu_pasid_alloc(16);<br>
+ if (r < 0)<br>
goto error_fini_vm;<br>
- }<br>
+ test->pasid = r;<br>
<br>
r = amdgpu_bo_create_kernel(adev, sizeof(struct umsch_mm_test_ctx_data),<br>
PAGE_SIZE, AMDGPU_GEM_DOMAIN_GTT,<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>