Subject: Re: [PATCH 08/17] nfp: no need to check return value of debugfs_create functions

From: Greg Kroah-Hartman <[email-masked]>
Date: Tue, 6 Aug 2019 19:00:49 +0200

On Tue, Aug 06, 2019 at 09:50:08AM -0700, Jakub Kicinski wrote:
> On Tue,  6 Aug 2019 18:11:19 +0200, 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.
> > 
> > Cc: Jakub Kicinski <[email-masked]>
> > Cc: "David S. Miller" <[email-masked]>
> > Cc: Alexei Starovoitov <[email-masked]>
> > Cc: Daniel Borkmann <[email-masked]>
> > Cc: Jesper Dangaard Brouer <[email-masked]>
> > Cc: John Fastabend <[email-masked]>
> > Cc: Edwin Peer <[email-masked]>
> > Cc: Yangtao Li <[email-masked]>
> > Cc: Simon Horman <[email-masked]>
> > Cc: [email-masked]
> > Cc: [email-masked]
> > Signed-off-by: Greg Kroah-Hartman <[email-masked]>
> 
> Acked-by: Jakub Kicinski <[email-masked]>
> 
> I take it this is the case since commit ff9fb72bc077 ("debugfs: return
> error values, not NULL")? I.e. v5.0? It'd be useful to know for backport
> purposes.

You were always safe to ignore debugfs calls before that, but in 5.0 and
then 5.2 we got a bit more "robust" with some internal debugfs logic to
make it even easier.  These can be backported to 2.6.11+ if you really
want to, no functionality should change.

But why would you want to backport them?  This really isn't a "bugfix"
for a stable kernel.  No one should ever noticed the difference except
for less memory being used.

thanks,

greg k-h