[PATCH 9/9] drm/virtio: Implement dumb_create_fbdev with GEM SHMEM helpers
Javier Martinez Canillas
javierm at redhat.com
Wed Mar 9 11:29:54 UTC 2022
On 3/9/22 09:52, Thomas Zimmermann wrote:
[snip]
>>> +struct drm_gem_object *virtio_gpu_create_object_fbdev(struct drm_device *dev,
>>> + size_t size)
>>> +{
>>> + return ERR_PTR(-ENOSYS);
>>> +}
>>
>> As mentioned, I believe this should be ERR_PTR(-ENOTSUPP) instead.
>
> I've been wondering about this as well. I finally went with the rules at
> [1]. All the variants of ENOTOP/ENOTSUPP seem to be for specific use
> cases, such as a certain feature is not implemented be a specific
> interface (e.g., sockets for EOPNOTSUPP). ENOSYS is the only general
> error that indicates that an entire interface is missing. Even though
> checkpatch.pl warns that it's only for system calls.
>
> Best regards
> Thomas
>
> [1] https://www.cs.helsinki.fi/linux/linux-kernel/2002-30/1135.html
>
Thanks for the link. It would be good to have an authoritative guideline
about this in the kernel documentation (and make checkpatch.pl aware).
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
More information about the dri-devel
mailing list