[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200508154704.6njw5wfsain7p3ev@treble>
Date: Fri, 8 May 2020 10:47:04 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, rostedt@...dmis.org,
mhiramat@...nel.org, bristot@...hat.com, jbaron@...mai.com,
torvalds@...ux-foundation.org, tglx@...utronix.de,
mingo@...nel.org, namit@...are.com, hpa@...or.com, luto@...nel.org,
ard.biesheuvel@...aro.org, pbonzini@...hat.com,
mathieu.desnoyers@...icios.com
Subject: Re: [PATCH v4 14/18] static_call: Add static_cond_call()
On Fri, May 08, 2020 at 05:27:30PM +0200, Peter Zijlstra wrote:
> On Wed, May 06, 2020 at 12:24:55PM -0500, Josh Poimboeuf wrote:
>
> > On that note, what do you think about tweaking the naming from
> >
> > DEFINE_STATIC_COND_CALL(name, typename);
> > static_cond_call(name)(args...);
> >
> > to
> >
> > DEFINE_STATIC_CALL_NO_FUNC(name, typename);
> > static_call_if_func(name)(args...);
> >
> > ?
> >
> > Seems clearer to me. They're still STATIC_CALLs, so it seems logical to
> > keep those two words together. And NO_FUNC clarifies the initialized
> > value.
> >
> > Similarly RETTRAMP could be ARCH_DEFINE_STATIC_CALL_NO_FUNC.
>
> So I dislike static_call_if_func(), that's so much typing. Also, I
> prefer ARCH_*_RETTRAMP as it clearly describes what the thing is.
>
> How is something like this?
I like DEFINE_STATIC_CALL_NULL. I also like the new comment.
And if you're calling it
DEFINE_STATIC_CALL_NULL
then it seems like
ARCH_DEFINE_STATIC_CALL_NULL
would be the logical name rather than RETTRAMP?
Still not crazy about static_cond_call(), though I think at least
changing it to static_call_cond() would be better for namespacing
reasons.
--
Josh
Powered by blists - more mailing lists