linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Timur Tabi <ttabi@nvidia.com>
Cc: "corbet@lwn.net" <corbet@lwn.net>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"rdunlap@infradead.org" <rdunlap@infradead.org>
Subject: Re: [PATCH] docs: debugfs: do not recommend debugfs_remove_recursive
Date: Wed, 30 Apr 2025 19:10:34 +0200	[thread overview]
Message-ID: <2025043011-spring-tabloid-7e48@gregkh> (raw)
In-Reply-To: <2835cafd300c0dfcd6d1c9d941f3253b08805055.camel@nvidia.com>

On Wed, Apr 30, 2025 at 04:36:04PM +0000, Timur Tabi wrote:
> On Wed, 2025-04-30 at 16:57 +0200, gregkh@linuxfoundation.org wrote:
> > I don't really remember what we were talking about in 2019 for this, but
> > look at how many of each there are in the tree:
> > 	402	debugfs_remove
> > 	627	debugfs_remove_recursive
> > 
> > so we need to pick one and just stick to it.  Majority wins?  Shortest
> > function name wins?  Most descriptive winse?
> 
> How about "intent of the original patch wins"?  I'm pretty sure that if my patch had been merged in
> 2019, these numbers would be swapped.

5.4.0 came out in 2019, and the numbers there are:
	402	debugfs_remove
	461	debugfs_remove_recursive
So not quite.


But we are both ignoring debugfs_lookup_and_remove(), which I do
recommend people using over _both_ of those as there's no need to keep
anything around in the driver at all.

So that proves that you are right, and I'm wrong, as there is no
debugfs_lookup_and_remove_recursive()

> > So I'll defer to you, which one do you want?  You originally said
> > debugfs_remove(), which is fine, but you get to send a patch touching
> > all of those files :)
> 
> If you really want me to send out a patch modifying 600+ calls, I will, but I think that will cause
> more harm than good, and I'll just make more enemies than friends.  

A sed script for Linus at -rc1 is usually a good way to do this, but I
can throw some interns at it as well.  Or I can script it on my side and
just do a big push in one of my trees.

> All I was trying to do with my patch was have the documentation align with the code.  This would be
> a low-impact first step to replacing debugfs_remove_recursive with debugfs_remove everywhere.

Ok, fair enough, I'm now convinced, I'll go take your patch now, sorry
for the noise, but thanks for the discussion.

greg k-h

      reply	other threads:[~2025-04-30 17:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 17:39 [PATCH] docs: debugfs: do not recommend debugfs_remove_recursive Timur Tabi
2025-04-29 17:47 ` Greg Kroah-Hartman
2025-04-29 18:24   ` Timur Tabi
2025-04-30  7:30     ` gregkh
2025-04-30 14:27       ` Timur Tabi
2025-04-30 14:57         ` gregkh
2025-04-30 16:36           ` Timur Tabi
2025-04-30 17:10             ` gregkh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025043011-spring-tabloid-7e48@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=ttabi@nvidia.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).