On 12.03.2024 12:13, Nicola Vetrini wrote: > Rule 20.4 states: "A macro shall not be defined with the same name > as a keyword". > > Defining this macro with the same name as the inline keyword > allows for additionally checking that out-of-lined static inline > functions end up in the correct section while minimizing churn and > has a positive impact on the overall safety. See [1] for additional > context on the motivation of this deviation. > > No functional change. > > [1] > https://lore.kernel.org/xen-devel/adaa6d55-266d-4df8-8967-9340080d1...@citrix.com/ > > Signed-off-by: Nicola Vetrini <nicola.vetr...@bugseng.com>
Acked-by: Jan Beulich <jbeul...@suse.com> with ... > --- a/docs/misra/deviations.rst > +++ b/docs/misra/deviations.rst > @@ -322,6 +322,12 @@ Deviations related to MISRA C:2012 Rules: > - /\* Fallthrough \*/ > - /\* Fallthrough. \*/ > > + * - R20.4 > + - The override of the keyword \"inline\" in xen/compiler.h is present > so > + that section contents checks pass when the compiler chooses not to > + inline a particular function. ... padding (1st line of this bullet point) and indentation (2nd and 3rd lines) adjusted to what's used elsewhere, including e.g ... > + - Comment-based deviation. > + > * - R20.7 > - Code violating Rule 20.7 is safe when macro parameters are used: > (1) as function arguments; ... here. Happy to do so while committing. Jan