Re: [XEN PATCH 05/10] xen/perfc: address violations of MISRA C Rule 20.7

2024-02-29 Thread Nicola Vetrini
On 2024-02-29 17:42, Jan Beulich wrote: On 29.02.2024 16:27, Nicola Vetrini wrote: --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -10,10 +10,10 @@ #include #include -#define PERFCOUNTER( var, name ) { name, TYPE_SINGLE, 0 }, -#define PERFCOUNTER_ARRAY( var, name, size )

Re: [XEN PATCH 05/10] xen/perfc: address violations of MISRA C Rule 20.7

2024-02-29 Thread Jan Beulich
On 29.02.2024 16:27, Nicola Vetrini wrote: > --- a/xen/common/perfc.c > +++ b/xen/common/perfc.c > @@ -10,10 +10,10 @@ > #include > #include > > -#define PERFCOUNTER( var, name ) { name, TYPE_SINGLE, 0 }, > -#define PERFCOUNTER_ARRAY( var, name, size ) { name, TYPE_ARRAY, size

[XEN PATCH 05/10] xen/perfc: address violations of MISRA C Rule 20.7

2024-02-29 Thread Nicola Vetrini
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