* Re: [PATCH] msm: no need to check return value of debugfs_create functions
[not found] <20190613122402.GA30678@kroah.com>
@ 2019-06-13 12:37 ` Marc Gonzalez
2019-06-13 13:01 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Marc Gonzalez @ 2019-06-13 12:37 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: LKML
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) ?
Regards.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] msm: no need to check return value of debugfs_create functions
2019-06-13 12:37 ` [PATCH] msm: no need to check return value of debugfs_create functions Marc Gonzalez
@ 2019-06-13 13:01 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2019-06-13 13:01 UTC (permalink / raw)
To: Marc Gonzalez; +Cc: LKML
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-13 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190613122402.GA30678@kroah.com>
2019-06-13 12:37 ` [PATCH] msm: no need to check return value of debugfs_create functions Marc Gonzalez
2019-06-13 13:01 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox