On Wed, 18 Jun 2025 at 08:10, Steven Rostedt <rost...@goodmis.org> wrote:
>
> Don't we usually shout macros?

Not really. It's more about "we shout about macros when they _behave_
like macros".

So typically we do all upper-case for things that are constants
(whether enums or macros, actually) or when they don't act like normal
functions.

But when it's not particularly important that it's a macro, and it
could have been a function (but maybe it was just simpler to use a
macro for whatever reason), we typically don't use all upper-case.

In this case, I have to agree with PeterZ that this just looks odd:

-       if (get_user(ra, (unsigned long *)(cfa + frame->ra_off)))
+       if (UNWIND_GET_USER_LONG(ra, cfa + frame->ra_off, state))

why is UNWIND_GET_USER_LONG() so loud when it just replaces "get_user()"?

Note that "get_user()" itself is a macro, and is lower-case, even
though you couldn't actually do it as a function (because it changes
its first argument in place).

             Linus

Reply via email to