[Intel-xe] [PATCH] drm/Xe: Use EOPNOTSUPP instead of ENOTSUPP
Iddamsetty, Aravind
aravind.iddamsetty at intel.com
Wed Jun 7 11:32:03 UTC 2023
On 07-06-2023 16:36, janga.rahul.kumar at intel.com wrote:
> From: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
>
> ENOTSUPP is not a standard Unix error.
may be just complete the sentence "should use ENOTSUPP instead."
>
> Cc: Aravind Iddamsetty <aravind.iddamsetty at intel.com>
> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> ---
> 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(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_engine.c b/drivers/gpu/drm/xe/xe_engine.c
> index 094ec17d3004..39d824ad7c82 100644
> --- a/drivers/gpu/drm/xe/xe_engine.c
> +++ b/drivers/gpu/drm/xe/xe_engine.c
> @@ -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 = -EOPNOTSUPP;
> goto put_engine;
> }
>
> diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> index c7fbb1cc1f64..9fda28353ebc 100644
> --- a/drivers/gpu/drm/xe/xe_mmio.c
> +++ b/drivers/gpu/drm/xe/xe_mmio.c
> @@ -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 = -EOPNOTSUPP;
> 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 = -EOPNOTSUPP;
> }
> }
>
> diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
> index 99f1ed87196d..b9e3214e4448 100644
> --- a/drivers/gpu/drm/xe/xe_sync.c
> +++ b/drivers/gpu/drm/xe/xe_sync.c
> @@ -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 -EOPNOTSUPP;
>
> 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 -EOPNOTSUPP;
>
> 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 -EOPNOTSUPP;
>
> if (XE_IOCTL_ERR(xe, sync_in.addr & 0x7))
> return -EINVAL;
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 0a4becdf4675..3208319475c4 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -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 -EOPNOTSUPP;
>
> if (XE_IOCTL_ERR(xe, vm->async_ops.error_capture.addr))
> - return -ENOTSUPP;
> + return -EOPNOTSUPP;
>
> 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 = -EOPNOTSUPP;
> 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 = -EOPNOTSUPP;
> goto put_engine;
> }
>
> diff --git a/drivers/gpu/drm/xe/xe_wait_user_fence.c b/drivers/gpu/drm/xe/xe_wait_user_fence.c
> index 15c2e5aa08d2..5880e6cf8af9 100644
> --- a/drivers/gpu/drm/xe/xe_wait_user_fence.c
> +++ b/drivers/gpu/drm/xe/xe_wait_user_fence.c
> @@ -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 -EOPNOTSUPP;
> }
>
> addr = vm->async_ops.error_capture.addr;
good catch.
Reviewed-by: Aravind Iddamsetty <aravind.iddamsetty at intel.com>
Thanks,
Aravind.
More information about the Intel-xe
mailing list