[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/irq: address violations of MISRA C Rule 20.7
commit 8f5581d7e1f37f38c3c92c01611e9f19b38e4881 Author: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> AuthorDate: Thu Jun 27 13:47:16 2024 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Jun 27 13:47:16 2024 +0200 x86/irq: address violations of MISRA C Rule 20.7 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> Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> --- xen/include/xen/irq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 580ae37e74..17211f3399 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -178,7 +178,7 @@ extern struct pirq *pirq_get_info(struct domain *d, int pirq); #define pirq_field(d, p, f, def) ({ \ const struct pirq *__pi = pirq_info(d, p); \ - __pi ? __pi->f : def; \ + __pi ? __pi->f : (def); \ }) #define pirq_to_evtchn(d, pirq) pirq_field(d, pirq, evtchn, 0) #define pirq_masked(d, pirq) pirq_field(d, pirq, masked, 0) -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |