Skip to contentSkip to conversation

drm/Xe: Use ENOTSUP instead of ENOTSUPP

PATCH In review [email protected] 3 participants 3 messages Jun 8, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/Xe: Use ENOTSUP instead of ENOTSUPP

From: Janga Rahul Kumar <[email protected]>

ENOTSUPP is not a standard Unix error use ENOTSUP instead.

v2: Update commit description (Aravind)
Use ENOTSUP instead of EOPNOTSUPP as EOPNOTSUPP is recommended for socket. (Himal)

Sample checkpatch warning:
WARNING: ENOTSUPP is not a SUSV4 error code
+ return -ENOTSUPP;

Cc Himal Prasad Ghimiray <[email protected]>
Cc Aravind Iddamsetty <[email protected]>
---
 drivers/gpu/drm/xe/xe_engine.c          | 2 +-
 drivers/gpu/drm/xe/xe_mmio.c            | 4 ++--
 drivers/gpu/drm/xe/xe_sync.c            | 6 +++---
 drivers/gpu/drm/xe/xe_vm.c              | 8 ++++----
 drivers/gpu/drm/xe/xe_wait_user_fence.c | 2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/xe/xe_engine.c +1 -1
index 094ec17d3004..6c3e2840d1c1 100644
@@ -609,7 +609,7 @@ int xe_engine_create_ioctl(struct drm_device *dev, void *data,
 
 	if (XE_IOCTL_ERR(xe, e->vm && xe_vm_in_compute_mode(e->vm) !=
 			 !!(e->flags & ENGINE_FLAG_COMPUTE_MODE))) {
-		err = -ENOTSUPP;
+		err = -ENOTSUP;
 		goto put_engine;
 	}
 
drivers/gpu/drm/xe/xe_mmio.c +2 -2
index c7fbb1cc1f64..54400147e7df 100644
@@ -461,7 +461,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data,
 			fallthrough;
 		case DRM_XE_MMIO_8BIT: /* TODO */
 		case DRM_XE_MMIO_16BIT: /* TODO */
-			ret = -ENOTSUPP;
+			ret = -ENOTSUP;
 			goto exit;
 		}
 	}
@@ -479,7 +479,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data,
 			fallthrough;
 		case DRM_XE_MMIO_8BIT: /* TODO */
 		case DRM_XE_MMIO_16BIT: /* TODO */
-			ret = -ENOTSUPP;
+			ret = -ENOTSUP;
 		}
 	}
 
drivers/gpu/drm/xe/xe_sync.c +3 -3
index 99f1ed87196d..7969e6057d23 100644
@@ -116,7 +116,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 	switch (sync_in.flags & SYNC_FLAGS_TYPE_MASK) {
 	case DRM_XE_SYNC_SYNCOBJ:
 		if (XE_IOCTL_ERR(xe, no_dma_fences))
-			return -ENOTSUPP;
+			return -ENOTSUP;
 
 		if (XE_IOCTL_ERR(xe, upper_32_bits(sync_in.addr)))
 			return -EINVAL;
@@ -134,7 +134,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 
 	case DRM_XE_SYNC_TIMELINE_SYNCOBJ:
 		if (XE_IOCTL_ERR(xe, no_dma_fences))
-			return -ENOTSUPP;
+			return -ENOTSUP;
 
 		if (XE_IOCTL_ERR(xe, upper_32_bits(sync_in.addr)))
 			return -EINVAL;
@@ -169,7 +169,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 
 	case DRM_XE_SYNC_USER_FENCE:
 		if (XE_IOCTL_ERR(xe, !(sync_in.flags & DRM_XE_SYNC_SIGNAL)))
-			return -ENOTSUPP;
+			return -ENOTSUP;
 
 		if (XE_IOCTL_ERR(xe, sync_in.addr & 0x7))
 			return -EINVAL;
drivers/gpu/drm/xe/xe_vm.c +4 -4
index 0a4becdf4675..b1e3d8d26e46 100644
@@ -1764,10 +1764,10 @@ static int vm_set_error_capture_address(struct xe_device *xe, struct xe_vm *vm,
 		return -EINVAL;
 
 	if (XE_IOCTL_ERR(xe, !(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS)))
-		return -ENOTSUPP;
+		return -ENOTSUP;
 
 	if (XE_IOCTL_ERR(xe, vm->async_ops.error_capture.addr))
-		return -ENOTSUPP;
+		return -ENOTSUP;
 
 	vm->async_ops.error_capture.mm = current->mm;
 	vm->async_ops.error_capture.addr = value;
@@ -3033,7 +3033,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
 
 	if (VM_BIND_OP(bind_ops[0].op) == XE_VM_BIND_OP_RESTART) {
 		if (XE_IOCTL_ERR(xe, !(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS)))
-			err = -ENOTSUPP;
+			err = -ENOTSUP;
 		if (XE_IOCTL_ERR(xe, !err && args->num_syncs))
 			err = EINVAL;
 		if (XE_IOCTL_ERR(xe, !err && !vm->async_ops.error))
@@ -3058,7 +3058,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
 
 	if (XE_IOCTL_ERR(xe, !vm->async_ops.error &&
 			 async != !!(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS))) {
-		err = -ENOTSUPP;
+		err = -ENOTSUP;
 		goto put_engine;
 	}
 
drivers/gpu/drm/xe/xe_wait_user_fence.c +1 -1
index 15c2e5aa08d2..752b094848d5 100644
@@ -142,7 +142,7 @@ int xe_wait_user_fence_ioctl(struct drm_device *dev, void *data,
 
 		if (XE_IOCTL_ERR(xe, !vm->async_ops.error_capture.addr)) {
 			xe_vm_put(vm);
-			return -ENOTSUPP;
+			return -ENOTSUP;
 		}
 
 		addr = vm->async_ops.error_capture.addr;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 11 lines · On 08-06-2023 14:25, [email protected] wrote:

From: Janga Rahul Kumar <[email protected]>

ENOTSUPP is not a standard Unix error use ENOTSUP instead.

v2: Update commit description (Aravind)
Use ENOTSUP instead of EOPNOTSUPP as EOPNOTSUPP is recommended for socket. (Himal)

Sample checkpatch warning:
WARNING: ENOTSUPP is not a SUSV4 error code
+ return -ENOTSUPP;

did the kernel compile fine as there is no ENOTSUP defined in kernel, you should use EOPNOTSUPP, please check.

Thanks,
Aravind.

Quoted 126 lines
Cc Himal Prasad Ghimiray <[email protected]>
Cc Aravind Iddamsetty <[email protected]>
---
 drivers/gpu/drm/xe/xe_engine.c          | 2 +-
 drivers/gpu/drm/xe/xe_mmio.c            | 4 ++--
 drivers/gpu/drm/xe/xe_sync.c            | 6 +++---
 drivers/gpu/drm/xe/xe_vm.c              | 8 ++++----
 drivers/gpu/drm/xe/xe_wait_user_fence.c | 2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/xe/xe_engine.c +1 -1
index 094ec17d3004..6c3e2840d1c1 100644
@@ -609,7 +609,7 @@ int xe_engine_create_ioctl(struct drm_device *dev, void *data,
 
 	if (XE_IOCTL_ERR(xe, e->vm && xe_vm_in_compute_mode(e->vm) !=
 			 !!(e->flags & ENGINE_FLAG_COMPUTE_MODE))) {
-		err = -ENOTSUPP;
+		err = -ENOTSUP;
 		goto put_engine;
 	}
 
drivers/gpu/drm/xe/xe_mmio.c +2 -2
index c7fbb1cc1f64..54400147e7df 100644
@@ -461,7 +461,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data,
 			fallthrough;
 		case DRM_XE_MMIO_8BIT: /* TODO */
 		case DRM_XE_MMIO_16BIT: /* TODO */
-			ret = -ENOTSUPP;
+			ret = -ENOTSUP;
 			goto exit;
 		}
 	}
@@ -479,7 +479,7 @@ int xe_mmio_ioctl(struct drm_device *dev, void *data,
 			fallthrough;
 		case DRM_XE_MMIO_8BIT: /* TODO */
 		case DRM_XE_MMIO_16BIT: /* TODO */
-			ret = -ENOTSUPP;
+			ret = -ENOTSUP;
 		}
 	}
 
drivers/gpu/drm/xe/xe_sync.c +3 -3
index 99f1ed87196d..7969e6057d23 100644
@@ -116,7 +116,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 	switch (sync_in.flags & SYNC_FLAGS_TYPE_MASK) {
 	case DRM_XE_SYNC_SYNCOBJ:
 		if (XE_IOCTL_ERR(xe, no_dma_fences))
-			return -ENOTSUPP;
+			return -ENOTSUP;
 
 		if (XE_IOCTL_ERR(xe, upper_32_bits(sync_in.addr)))
 			return -EINVAL;
@@ -134,7 +134,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 
 	case DRM_XE_SYNC_TIMELINE_SYNCOBJ:
 		if (XE_IOCTL_ERR(xe, no_dma_fences))
-			return -ENOTSUPP;
+			return -ENOTSUP;
 
 		if (XE_IOCTL_ERR(xe, upper_32_bits(sync_in.addr)))
 			return -EINVAL;
@@ -169,7 +169,7 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 
 	case DRM_XE_SYNC_USER_FENCE:
 		if (XE_IOCTL_ERR(xe, !(sync_in.flags & DRM_XE_SYNC_SIGNAL)))
-			return -ENOTSUPP;
+			return -ENOTSUP;
 
 		if (XE_IOCTL_ERR(xe, sync_in.addr & 0x7))
 			return -EINVAL;
drivers/gpu/drm/xe/xe_vm.c +4 -4
index 0a4becdf4675..b1e3d8d26e46 100644
@@ -1764,10 +1764,10 @@ static int vm_set_error_capture_address(struct xe_device *xe, struct xe_vm *vm,
 		return -EINVAL;
 
 	if (XE_IOCTL_ERR(xe, !(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS)))
-		return -ENOTSUPP;
+		return -ENOTSUP;
 
 	if (XE_IOCTL_ERR(xe, vm->async_ops.error_capture.addr))
-		return -ENOTSUPP;
+		return -ENOTSUP;
 
 	vm->async_ops.error_capture.mm = current->mm;
 	vm->async_ops.error_capture.addr = value;
@@ -3033,7 +3033,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
 
 	if (VM_BIND_OP(bind_ops[0].op) == XE_VM_BIND_OP_RESTART) {
 		if (XE_IOCTL_ERR(xe, !(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS)))
-			err = -ENOTSUPP;
+			err = -ENOTSUP;
 		if (XE_IOCTL_ERR(xe, !err && args->num_syncs))
 			err = EINVAL;
 		if (XE_IOCTL_ERR(xe, !err && !vm->async_ops.error))
@@ -3058,7 +3058,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
 
 	if (XE_IOCTL_ERR(xe, !vm->async_ops.error &&
 			 async != !!(vm->flags & XE_VM_FLAG_ASYNC_BIND_OPS))) {
-		err = -ENOTSUPP;
+		err = -ENOTSUP;
 		goto put_engine;
 	}
 
drivers/gpu/drm/xe/xe_wait_user_fence.c +1 -1
index 15c2e5aa08d2..752b094848d5 100644
@@ -142,7 +142,7 @@ int xe_wait_user_fence_ioctl(struct drm_device *dev, void *data,
 
 		if (XE_IOCTL_ERR(xe, !vm->async_ops.error_capture.addr)) {
 			xe_vm_put(vm);
-			return -ENOTSUPP;
+			return -ENOTSUP;
 		}
 
 		addr = vm->async_ops.error_capture.addr;
#2 lore raw

[Intel-xe] ✗ CI.Patch_applied: failure for drm/Xe: Use ENOTSUP instead of ENOTSUPP

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/Xe: Use ENOTSUP instead of ENOTSUPP
URL : https://patchwork.freedesktop.org/series/119056/
State : failure

== Summary ==

=== Applying kernel patches on branch 'drm-xe-next' with base: === Base commit: c075cadc4 drm/xe: Fix some formatting issues in uAPI === git am output follows ===
error: patch failed: drivers/gpu/drm/xe/xe_sync.c:116
error: drivers/gpu/drm/xe/xe_sync.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: drm/Xe: Use ENOTSUP instead of ENOTSUPP
Patch failed at 0001 drm/Xe: Use ENOTSUP instead of ENOTSUPP When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".