Re: [Nouveau] [PATCH] nouveau: no need to check return value of debugfs_create functions

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

 



On Fri, Feb 14, 2020 at 12:30:48AM +0100, Daniel Vetter wrote:
> On Thu, Feb 13, 2020 at 11:39 PM Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > On Thu, Feb 13, 2020 at 02:30:09PM -0800, John Hubbard wrote:
> > > On 2/9/20 2:55 AM, Greg Kroah-Hartman wrote:
> > > > When calling debugfs functions, there is no need to ever check the
> > > > return value.  The function can work or not, but the code logic should
> > > > never do something different based on this.
> > > >
> > >
> > > Should we follow that line of reasoning further, and simply return void
> > > from the debugfs functions--rather than playing whack-a-mole with this
> > > indefinitely?
> >
> > That is what we (well I) have been doing.  Look at all of the changes
> > that have happened to include/linux/debugfs.h over the past few
> > releases.  I'm slowly winnowing down the api to make it impossible to
> > get wrong for this type of thing, and am almost there.
> >
> > DRM is the big fish left to tackle, I have submitted some patches in the
> > past, but lots more cleanup needs to be done to get them into mergable
> > shape.  I just need to find the time...
> 
> Just to avoid duplication, Wambui (cc'ed) just started working on
> this. Expect a lot more void return values and a pile of deleted code
> rsn.

Nice!

It's not duplication if I haven't started on it :)

greg k-h
_______________________________________________
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