AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: Fix ENOSYS with better fitting error codes in radeon_gem.c
@ 2023-07-26 14:16 Srinivasan Shanmugam
  2023-07-26 18:30 ` Alex Deucher
  2023-07-27  9:30 ` Christian König
  0 siblings, 2 replies; 3+ messages in thread
From: Srinivasan Shanmugam @ 2023-07-26 14:16 UTC (permalink / raw)
  To: Christian König, Alex Deucher, Guchun Chen
  Cc: Srinivasan Shanmugam, amd-gfx

Replace the error code from 'ENOSYS' to 'EOPNOTSUPP' for unimplemented
radeon_gem_pread_ioctl & radeon_gem_pwrite_ioctl

Fixes the following:

WARNING: ENOSYS means 'invalid syscall nr' and nothing else.

Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
---
 drivers/gpu/drm/radeon/radeon_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index d0119c5f7eb3..358d19242f4b 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -316,7 +316,7 @@ int radeon_gem_pread_ioctl(struct drm_device *dev, void *data,
 {
 	/* TODO: implement */
 	DRM_ERROR("unimplemented %s\n", __func__);
-	return -ENOSYS;
+	return -EOPNOTSUPP;
 }
 
 int radeon_gem_pwrite_ioctl(struct drm_device *dev, void *data,
@@ -324,7 +324,7 @@ int radeon_gem_pwrite_ioctl(struct drm_device *dev, void *data,
 {
 	/* TODO: implement */
 	DRM_ERROR("unimplemented %s\n", __func__);
-	return -ENOSYS;
+	return -EOPNOTSUPP;
 }
 
 int radeon_gem_create_ioctl(struct drm_device *dev, void *data,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-27  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 14:16 [PATCH] drm/radeon: Fix ENOSYS with better fitting error codes in radeon_gem.c Srinivasan Shanmugam
2023-07-26 18:30 ` Alex Deucher
2023-07-27  9:30 ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox