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

From: Greg Kroah-Hartman
Date: Thu Jun 13 2019 - 11:24:07 EST


On Thu, Jun 13, 2019 at 02:37:46PM +0200, Marc Gonzalez wrote:
> On 13/06/2019 14:24, 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.
>
> Naive question: if callers are supposed to ignore the return value,
> why not change the prototype to void (no return value) ?

I am trying to do that, but sometimes you need the return value (like
for debugfs_create_dir()). I have removed the return value from a
number of debugfs calls already, but the kernel is vast and big, and the
tendrils of debugfs use is deep, it is taking a while :)

Don't worry, there are more patches to come, this is just the first
wave.

thanks,

greg k-h