Re: [PATCH v2 5/6] virtio-gpu: add basic prime support

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

 



On Tue, Sep 22, 2015 at 05:24:29PM +0200, Gerd Hoffmann wrote:
> > > +int virtgpu_gem_prime_mmap(struct drm_gem_object *obj,
> > > +		       struct vm_area_struct *area)
> > > +{
> > > +	WARN_ONCE(1, "not implemented");
> > > +	return ENOSYS;
> > 
> > This can get called by userspace, so please don't WARN here. Also missing
> > negate sign:
> > 
> > 	return -ENOSYS;
> 
> Hmm now checkpatch throws a warning at me:
> 
> <quote>
>    WARNING: ENOSYS means 'invalid syscall nr' and nothing else
>    #12: FILE: drivers/gpu/drm/virtio/virtgpu_prime.c:70:
>    +       return -ENOSYS;
> </quote>
> 
> I guess I should use something else then (here and elsewhere in the
> file)?  Maybe -EINVAL?  Other suggestions?

-ENODEV is what we occasionally pick. drm is fairly creative at errno
abuse, e.g. we already use -ENOENT to signal any kind of lookup failure in
ioctls (even if the fd itself is obviously there so not possible that the
fd isn't there).

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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