lkml.org 
[lkml]   [2020]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2020-05-08 17:49    [W:2.110 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site