mbox series

[XEN,v3,0/7] address violations of MISRA C Rule 20.7

Message ID cover.1711700095.git.nicola.vetrini@bugseng.com (mailing list archive)
Headers show
Series address violations of MISRA C Rule 20.7 | expand

Message

Nicola Vetrini March 29, 2024, 9:11 a.m. UTC
Hi all,

this series aims to refactor some macros that cause violations of MISRA C Rule
20.7 ("Expressions resulting from the expansion of macro parameters shall be
enclosed in parentheses"). All the macros touched by these patches are in some
way involved in violations, and the strategy adopted to bring them into
compliance is to add parentheses around macro arguments where needed.

Deviations from the rule have been amended to encompass also direct use in
initializer lists of macro arguments.

Patch 1 is taken, with adjustments, from the earlier series (which was
incorrectly tagged as v1). All other patches are new in this series and are
pairwise indipendent.

Nicola Vetrini (7):
  x86/msi: address violation of MISRA C Rule 20.7 and coding style
  arm/public: address violations of MISRA C Rule 20.7
  x86/vPMU: address violations of MISRA C Rule 20.7
  x86/hvm: address violations of MISRA C Rule 20.7
  automation/eclair: add deviations for Rule 20.7
  xen/mm: address violations of MISRA C Rule 20.7
  x86/amd: address violations of MISRA C Rule 20.7

 .../eclair_analysis/ECLAIR/deviations.ecl     | 25 +++++++++-
 docs/misra/deviations.rst                     | 14 +++++-
 docs/misra/rules.rst                          |  2 +-
 xen/arch/x86/hvm/domain.c                     |  6 +--
 xen/arch/x86/include/asm/amd.h                |  3 +-
 xen/arch/x86/include/asm/msi.h                | 49 ++++++++++---------
 xen/arch/x86/include/asm/vpmu.h               |  4 +-
 xen/include/public/arch-arm.h                 |  2 +-
 xen/include/xen/mm.h                          | 14 +++---
 9 files changed, 77 insertions(+), 42 deletions(-)