[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdUhSKFrcaiB0KHsgg1=4_RX3XjUpzMV=Y=RxErRmsn=sA@mail.gmail.com>
Date: Tue, 25 May 2021 09:26:42 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] debugfs: remove return value of debugfs_create_bool()
Hi Greg,
On Mon, May 24, 2021 at 2:39 PM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
> On Mon, May 24, 2021 at 01:44:38PM +0200, Geert Uytterhoeven wrote:
> > On Mon, May 24, 2021 at 12:18 PM Greg Kroah-Hartman
> > <gregkh@...uxfoundation.org> wrote:
> > > On Mon, May 24, 2021 at 11:51:42AM +0200, Geert Uytterhoeven wrote:
> > > > On Mon, May 24, 2021 at 11:41 AM Greg Kroah-Hartman
> > > > <gregkh@...uxfoundation.org> wrote:
> > > > > On Mon, May 24, 2021 at 11:11:32AM +0200, Geert Uytterhoeven wrote:
> > > > > > On Fri, May 21, 2021 at 10:28 PM Greg Kroah-Hartman
> > > > > > <gregkh@...uxfoundation.org> wrote:
> > > > > > > No one checks the return value of debugfs_create_bool(), as it's not
> > > > > > > needed, so make the return value void, so that no one tries to do so in
> > > > > >
> > > > > > Please explain in the patch description why it is not needed.
> > > > >
> > > > > Because you just do not need it, like almost all other debugfs calls
> > > > > now.
> > > >
> > > > Why do I just not need it?
> > >
> > > Let me flip it around, why do you need it? There are no in-kernel users
> > > of the return value anymore so what code requires this pointer now?
> >
> > There still are a few users of other members in the family, and some
> > of them are meant to be removed without removing the full parent
> > directory. Having all debugfs_create_*() functions behave the same
> > is a bonus.
>
> I agree, and we are almost there, all that is left is:
> debugfs_create_blob()
> debugfs_create_file()
> debugfs_create_file_unsafe()
> for creating debugfs files.
>
> There is still:
> debugfs_create_dir()
> debugfs_create_symlink()
> debugfs_create_automount()
> for non-file creations that do not return void.
>
> The majority of the debugfs_create_* functions now do not return
> anything.
>
> > But if other people are fine with having to call
> > debugfs_remove(debugfs_lookup(...)), well, let it be like that...
>
> It saves at least a static variable, so what's not to like? :)
Which is more than offset by the cost of the new debugfs_lookup() call...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists