|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 10/11] x86/hvm: address violations of Rule 20.7
On 22.03.2024 17:01, Nicola Vetrini wrote:
> MISRA C Rule 20.7 states: "Expressions resulting from the expansion
> of macro parameters shall be enclosed in parentheses". Therefore, some
> macro definitions should gain additional parentheses to ensure that all
> current and future users will be safe with respect to expansions that
> can possibly alter the semantics of the passed-in macro parameter.
>
> No functional change.
>
> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
albeit preferably with ...
> --- a/xen/arch/x86/include/asm/hvm/save.h
> +++ b/xen/arch/x86/include/asm/hvm/save.h
> @@ -128,9 +128,9 @@ static int __init cf_check
> __hvm_register_##_x##_save_and_restore(void) \
> { \
> hvm_register_savevm(HVM_SAVE_CODE(_x), \
> #_x, \
> - &_save, \
> + &(_save), \
> check, \
> - &_load, \
> + &(_load), \
... the &s dropped rather than parentheses added, as we already have it
for (the recently added) "check".
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |