Re: [PATCH] drm: Use EOPNOTSUPP, not ENOTSUPP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Den 04.09.2019 16.39, skrev Daniel Vetter:
> - it's what we recommend in our docs:
> 
> https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#recommended-ioctl-return-values
> 
> - it's the overwhelmingly used error code for "operation not
>   supported", at least in drm core (slightly less so in drivers):
> 
> $ git grep EOPNOTSUP -- drivers/gpu/drm/*c | wc -l
> 83
> $ git grep ENOTSUP -- drivers/gpu/drm/*c | wc -l
> 5
> 
> - include/linux/errno.h makes it fairly clear that these are for nfsv3
>   (plus they also have error codes above 512, which is the block with
>   some special behaviour ...)
> 
> /* Defined for the NFSv3 protocol */
> 
> If the above isn't reflecting current practice, then I guess we should
> at least update the docs.
> 
> Cc: José Roberto de Souza <jose.souza@xxxxxxxxx>
> Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> Cc: Maxime Ripard <mripard@xxxxxxxxxx>
> Cc: Sean Paul <sean@xxxxxxxxxx>
> Cc: Alex Deucher <alexander.deucher@xxxxxxx>
> Cc: Andres Rodriguez <andresx7@xxxxxxxxx>
> Cc: Noralf Trønnes <noralf@xxxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_edid.c     | 6 +++---
>  drivers/gpu/drm/drm_mipi_dbi.c | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 

Acked-by: Noralf Trønnes <noralf@xxxxxxxxxxx>

Ben Hutchings made this comment[1] in a thread about use of ENOTSUPP in
drivers:

  glibc's strerror() returns these strings for ENOTSUPP and EOPNOTSUPP
  respectively:

  "Unknown error 524"
  "Operation not supported"

So at least for errors returned to userspace EOPNOTSUPP makes sense.

Noralf.

[1] https://patchwork.ozlabs.org/patch/309627/#690997
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux