mbox series

[XEN,v3,0/3] fix violations of MISRA C:2012 Rule 3.1

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

Message

Nicola Vetrini June 29, 2023, 10:06 a.m. UTC
Hi all,

This patch series is about the violations present in the Xen sources of
Rule 3.1 from MISRA C:2012, whose headline states:
"The character sequences '/*' and '//' shall not be used within a comment".

In the context of the effort to bring xen into compliance w.r.t.
MISRA C:2012, and Rule 3.1 being already approved for the project (as
evidenced by `docs/misra/rules.rst'), these violations need to be fixed.

Most of the violations are due to the presence of links to webpages within
C-style comment blocks, such as:

xen/arch/arm/include/asm/smccc.h:37.1-41.3
/*
 * This file provides common defines for ARM SMC Calling Convention as
 * specified in
 * http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html
*/

In this case, I propose to deviate all of these occurrences with a
project deviation to be captured by a tool configuration
(not included in any patch from this series).

There are, however, a few other violations that do not fall under this
category, which are the focus of the following set of patches. They either:

1. remove the nested '//' character sequence within a block comment;
2. replacing the nested '//' character sequence with ARM asm comments
   or similar constructs that do not violate the rule.

Thanks,
  Nicola

Nicola Vetrini (3):
  xen/arch/arm: fix violations of MISRA C:2012 Rule 3.1
  xen/drivers/passthrough/arm/smmu-v3.c: fix violations of MISRA C:2012
    Rule 3.1
  xen: fix violations of MISRA C:2012 Rule 3.1

 xen/arch/arm/include/asm/arm32/flushtlb.h | 8 ++++----
 xen/arch/arm/include/asm/arm64/flushtlb.h | 8 ++++----
 xen/common/xmalloc_tlsf.c                 | 4 +---
 xen/drivers/passthrough/arm/smmu-v3.c     | 8 ++++----
 xen/include/xen/atomic.h                  | 2 +-
 5 files changed, 14 insertions(+), 16 deletions(-)

--
2.34.1