mbox series

[XEN,v2,0/7] address violations of MISRA C:2012 Rule 2.1

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

Message

Nicola Vetrini Dec. 18, 2023, 10:17 a.m. UTC
MISRA C:2012 Rule 2.1 states: "A project shall not contain unreachable code".
As such, this series eliminates various instances of unreachable code found in
Xen, by providing equivalent compliant constructs.

This series is loosely based on my earlier series [1], but the overall approach
has changed since; for instance, declarations without initialization are now
ignored, as detailed in docs/misra/deviations.rst.

[1] https://lore.kernel.org/xen-devel/cover.1690985045.git.nicola.vetrini@bugseng.com/

Changes in v2:
- Patch 4 has been committed;
- Drop Patch 7/7;
- Add two new patches:
  - "xen/arm: vcpreg: address violation of MISRA C Rule 2.1"
  - "automation/eclair_analysis: avoid violation of MISRA Rule 2.1"
- Reworked all other patches.

Nicola Vetrini (7):
  xen/shutdown: address MISRA C:2012 Rule 2.1
  x86/mm: address MISRA C:2012 Rule 2.1
  xen/arm: address MISRA C:2012 Rule 2.1
  xen/arm: traps: add ASSERT_UNREACHABLE() where needed
  x86/platform: removed break to address MISRA C:2012 Rule 2.1
  xen/arm: vcpreg: address violation of MISRA C Rule 2.1
  automation/eclair_analysis: avoid violation of MISRA Rule 2.1

 automation/eclair_analysis/ECLAIR/deviations.ecl |  7 ++++++-
 xen/arch/arm/mm.c                                |  1 +
 xen/arch/arm/traps.c                             |  3 ++-
 xen/arch/arm/vcpreg.c                            | 10 ++++++++--
 xen/arch/arm/vgic-v3-its.c                       |  1 +
 xen/arch/x86/mm.c                                |  2 --
 xen/arch/x86/platform_hypercall.c                |  1 -
 xen/common/shutdown.c                            | 15 ++++-----------
 8 files changed, 22 insertions(+), 18 deletions(-)