lkml.org 
[lkml]   [2023]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6 07/12] x86/cpu/keylocker: Load an internal wrapping key at boot-time
From
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.

\
 
 \ /
  Last update: 2023-05-09 02:52    [W:0.091 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site