Re: [PATCH] docs: debugfs: do not recommend debugfs_remove_recursive

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

 



On Tue, Apr 29, 2025 at 06:24:40PM +0000, Timur Tabi wrote:
> On Tue, 2025-04-29 at 19:47 +0200, Greg Kroah-Hartman wrote:
> > No, the other way around, we should be telling people to use
> > debugfs_remove_recursive() instead please, and getting rid of
> > debugfs_remove() entirely.
> 
> Then why was 
> 
> 	#define debugfs_remove_recursive debugfs_remove
> 
> added back in 2019, and why was that functionality *added* to debugfs_remove?

So we didn't have 2 functions that did the same thing and no one wanted
to sweep the tree and rename everything at that time?  I honestly don't
remember, that was tens of thousands of patches ago :)

> I recently added a patch to Nouveau that used debugfs_remove() to clean up all debugfs entries
> specifically because it operates recursively.

That's great, I'm not objecting to that, just that we need to stick with
one or the other and I'd prefer the "recursive" name as that makes it
blindingly obvious what is happening here while without it, people can
get confused.

thanks,

greg k-h




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux