Re: [PATCH v6 07/12] x86/cpu/keylocker: Load an internal wrapping key at boot-time

Dave Hansen
2023-05-09T00:51:46Z

On 5/8/23 17:31, Chang S. Bae wrote:
>> With the macro, they'll get no type warning.  The inline actually makes
>> it easier to find bugs because folks will get _some_ type checking no
>> matter how they compile the code.
>
> Ah, when the prototype with one or more arguments, 'static inline'
> allows the check. Then it is not an 'either-way' thing.
>
> Looking at the x86 code, there are some seemingly related:
>
> $ git grep "do { } while (0)" arch/x86 | grep -v "()"
...

Right. It's not a hard and fast rule. We certainly take code either
way and there can be real reasons to do it one way versus the other.