<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 2024-03-25 02:31, Su Hui wrote:<br>
</div>
<blockquote type="cite" cite="mid:20240325063148.3950639-1-suhui@nfschina.com">
<pre class="moz-quote-pre" wrap="">svm_ioctl() should return negative error code in default case.
Fixes: 42de677f7999 ("drm/amdkfd: register svm range")
Signed-off-by: Su Hui <a class="moz-txt-link-rfc2396E" href="mailto:suhui@nfschina.com"><suhui@nfschina.com></a></pre>
</blockquote>
<p>Good catch, ioctl should return -errno. I will apply it to
drm-next.</p>
<p>Reviewed-by: Philip Yang<a class="moz-txt-link-rfc2396E" href="mailto:philip.yang@amd.com"><philip.yang@amd.com></a><br>
</p>
<blockquote type="cite" cite="mid:20240325063148.3950639-1-suhui@nfschina.com">
<pre class="moz-quote-pre" wrap="">
---
Ps: When I try to compile this file, there is a error :
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:28:10: fatal error: amdgpu_sync.h:
No such file or directory.
Maybe there are some steps I missed or this place need to be corrected?</pre>
</blockquote>
<p>Don't know how you compile the driver, amdgpu_sync.h is located
under amdgpu folder, amdkfd/Makefile is included from
amdgpu/Makefile, which set ccflag-y -I correctly.</p>
<p>Regards,</p>
<p>Philip<br>
</p>
<blockquote type="cite" cite="mid:20240325063148.3950639-1-suhui@nfschina.com">
<pre class="moz-quote-pre" wrap="">
drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index f0f7f48af413..41c376f3fd27 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -4147,7 +4147,7 @@ svm_ioctl(struct kfd_process *p, enum kfd_ioctl_svm_op op, uint64_t start,
r = svm_range_get_attr(p, mm, start, size, nattrs, attrs);
break;
default:
- r = EINVAL;
+ r = -EINVAL;
break;
}
</pre>
</blockquote>
</body>
</html>