Re: [PATCH v2 2/3] list_debug: Introduce inline wrappers for debug checks
From: Marco Elver
Date: Fri Aug 04 2023 - 13:50:31 EST
On Fri, 4 Aug 2023 at 18:03, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> On Fri, 4 Aug 2023 11:02:57 +0200
> Marco Elver <elver@xxxxxxxxxx> wrote:
>
> > Turn the list debug checking functions __list_*_valid() into inline
> > functions that wrap the out-of-line functions. Care is taken to ensure
> > the inline wrappers are always inlined, so that additional compiler
> > instrumentation (such as sanitizers) does not result in redundant
> > outlining.
> >
> > This change is preparation for performing checks in the inline wrappers.
> >
> > No functional change intended.
>
> I think the entire underscoring functions calling more underscoring
> functions in the kernel is an abomination. Yes, there's lots of precedence
> to this craziness, but let's not extend it.
>
> Can we give actual real names to why the function is "special" besides that
> it now has another underscore added to it?
>
> I've been guilty of this madness myself, but I have learned the errors of
> my ways, and have been avoiding doing so in any new code I write.
That's fair. We can call them __list_*_valid() (inline), and
__list_*_valid_or_report() ?