On Fri, 27 Jun 2025 at 07:01, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > > That's not a function. It's just setting a macro named arch_unwind_user_next to > be arch_unwind_user_next. I think adding "()" to the end of that will be > confusing. Yeah, we use the pattern #define abc abc just to show "I have my own architecture-specific implementation for this" without having to make up a *new* name for it. [ We used to have things like "#define __arch_has_abc" instead, which is just annoying particularly when people didn't even always agree on the exact prefix. We still do, but we used to too. These days that "this arch has" pattern is _mostly_ confined to config variables, I think. ] Adding parenthesis not only makes that much more complicated - now you need to match argument numbers etc - but can actually end up causing real issues where you now can't use that 'abc' as a function pointer any more. That said, parenthesis can also actually help catch mis-uses (ie maybe you *cannot* use the function as a function pointer, exactly because some architectures _only_ implement it as a macro), so it's not like parentheses are necessarily always wrong, but in general, I think that #define abc abc pattern is the simplest and best way for an architecture header file to say "I have an implementation for this". And obviously the reason we have to use macros for this is because C doesn't have a way to test for symbols existing. Other languages do have things like that (various levels of "reflection"), but in C you're basically limited to the pre-processor. Linus