Re: [XEN PATCH 07/11] xen/page_alloc: address violations of MISRA C Rule 20.7

2024-03-26 Thread Nicola Vetrini
On 2024-03-26 16:35, Jan Beulich wrote: On 26.03.2024 16:27, Nicola Vetrini wrote: On 2024-03-25 10:27, Jan Beulich wrote: On 22.03.2024 17:01, Nicola Vetrini wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -150,7 +150,7 @@ #include #else #define

Re: [XEN PATCH 07/11] xen/page_alloc: address violations of MISRA C Rule 20.7

2024-03-26 Thread Jan Beulich
On 26.03.2024 16:27, Nicola Vetrini wrote: > On 2024-03-25 10:27, Jan Beulich wrote: >> On 22.03.2024 17:01, Nicola Vetrini wrote: >>> --- a/xen/common/page_alloc.c >>> +++ b/xen/common/page_alloc.c >>> @@ -150,7 +150,7 @@ >>> #include >>> #else >>> #define p2m_pod_offline_or_broken_hit(pg) 0

Re: [XEN PATCH 07/11] xen/page_alloc: address violations of MISRA C Rule 20.7

2024-03-26 Thread Nicola Vetrini
Hi Jan, sorry, forgot to reply. On 2024-03-25 10:27, Jan Beulich wrote: On 22.03.2024 17:01, Nicola Vetrini wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -150,7 +150,7 @@ #include #else #define p2m_pod_offline_or_broken_hit(pg) 0 Seeing this in context: Does

Re: [XEN PATCH 07/11] xen/page_alloc: address violations of MISRA C Rule 20.7

2024-03-25 Thread Jan Beulich
On 22.03.2024 17:01, Nicola Vetrini wrote: > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -150,7 +150,7 @@ > #include > #else > #define p2m_pod_offline_or_broken_hit(pg) 0 Seeing this in context: Does Misra also have a rule demanding evaluation of macro arguments? >

[XEN PATCH 07/11] xen/page_alloc: address violations of MISRA C Rule 20.7

2024-03-22 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