Skip to contentSkip to conversation

MISRA: Rephrase the deviation for Directive 4.10

PATCH In review Andrew Cooper 3 participants 4 messages Mar 4, 2025 – Mar 11, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MISRA: Rephrase the deviation for Directive 4.10

The use of "legitimately" mixes the concepts of "it was designed to do this" and "it was correct to do this".

The latter in particular can go stale. "intended" is a better way of phrasing this.

No functional change.

---
CC: Anthony PERARD <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Julien Grall <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Nicola Vetrini <[email protected]>

---
 automation/eclair_analysis/ECLAIR/deviations.ecl | 2 +-
 xen/arch/arm/include/asm/perfc_defn.h            | 2 +-
 xen/arch/x86/include/asm/perfc_defn.h            | 2 +-
 xen/include/asm-generic/perfc_defn.h             | 2 +-
 xen/include/xen/perfc_defn.h                     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
automation/eclair_analysis/ECLAIR/deviations.ecl +1 -1
index dfa5f34b3952..2c8fb9271391 100644
@@ -74,7 +74,7 @@ they are not instances of commented-out code."
 
 -doc_begin="Files that are intended to be included more than once do not need to
 conform to the directive."
--config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* This file is legitimately included multiple times\\. \\*/$, begin-4))"}
+-config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* This file is intended to be included multiple times\\. \\*/$, begin-4))"}
 -config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* Generated file, do not edit! \\*/$, begin-3))"}
 -config=MC3A2.D4.10,reports+={safe, "all_area(all_loc(file(^xen/include/generated/autoconf.h$)))"}
 -doc_end
xen/arch/arm/include/asm/perfc_defn.h +1 -1
index 3ab0391175d7..effd25b69ecc 100644
@@ -1,4 +1,4 @@
-/* This file is legitimately included multiple times. */
+/* This file is intended to be included multiple times. */
 /*#ifndef __XEN_PERFC_DEFN_H__*/
 /*#define __XEN_PERFC_DEFN_H__*/
 
xen/arch/x86/include/asm/perfc_defn.h +1 -1
index 487e20dc9734..d6127cb91ea5 100644
@@ -1,4 +1,4 @@
-/* This file is legitimately included multiple times. */
+/* This file is intended to be included multiple times. */
 /*#ifndef __XEN_PERFC_DEFN_H__*/
 /*#define __XEN_PERFC_DEFN_H__*/
 
xen/include/asm-generic/perfc_defn.h +1 -1
index 8237636d83fb..726cddc1b3e8 100644
@@ -1,4 +1,4 @@
-/* This file is legitimately included multiple times. */
+/* This file is intended to be included multiple times. */
 /* #ifndef ASM_GENERIC_PERFC_DEFN_H */
 /* #define ASM_GENERIC_PERFC_DEFN_H */
 
xen/include/xen/perfc_defn.h +1 -1
index a987d80dd6f1..afbabad0b3be 100644
@@ -1,4 +1,4 @@
-/* This file is legitimately included multiple times. */
+/* This file is intended to be included multiple times. */
 /*#ifndef __XEN_PERFC_DEFN_H__*/
 /*#define __XEN_PERFC_DEFN_H__*/
 

base-commit: 83e043ee72b8c2fe1d620d137c20a2ffb040da01

Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Andrew Cooper

The use of "legitimately" mixes the concepts of "it was designed to do this" and "it was correct to do this".

The latter in particular can go stale. "intended" is a better way of phrasing this.

No functional change.

Quoted 74 lines

---
CC: Anthony PERARD <[email protected]>
CC: Michal Orzel <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Julien Grall <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Nicola Vetrini <[email protected]>

---
 automation/eclair_analysis/ECLAIR/deviations.ecl | 2 +-
 xen/arch/arm/include/asm/perfc_defn.h            | 2 +-
 xen/arch/x86/include/asm/perfc_defn.h            | 2 +-
 xen/include/asm-generic/perfc_defn.h             | 2 +-
 xen/include/xen/perfc_defn.h                     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
automation/eclair_analysis/ECLAIR/deviations.ecl +1 -1
index dfa5f34b3952..2c8fb9271391 100644
@@ -74,7 +74,7 @@ they are not instances of commented-out code."
 
 -doc_begin="Files that are intended to be included more than once do not need to
 conform to the directive."
--config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* This file is legitimately included multiple times\\. \\*/$, begin-4))"}
+-config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* This file is intended to be included multiple times\\. \\*/$, begin-4))"}
 -config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* Generated file, do not edit! \\*/$, begin-3))"}
 -config=MC3A2.D4.10,reports+={safe, "all_area(all_loc(file(^xen/include/generated/autoconf.h$)))"}
 -doc_end
xen/arch/arm/include/asm/perfc_defn.h +1 -1
index 3ab0391175d7..effd25b69ecc 100644
@@ -1,4 +1,4 @@
-/* This file is legitimately included multiple times. */
+/* This file is intended to be included multiple times. */
 /*#ifndef __XEN_PERFC_DEFN_H__*/
 /*#define __XEN_PERFC_DEFN_H__*/
 
xen/arch/x86/include/asm/perfc_defn.h +1 -1
index 487e20dc9734..d6127cb91ea5 100644
@@ -1,4 +1,4 @@
-/* This file is legitimately included multiple times. */
+/* This file is intended to be included multiple times. */
 /*#ifndef __XEN_PERFC_DEFN_H__*/
 /*#define __XEN_PERFC_DEFN_H__*/
 
xen/include/asm-generic/perfc_defn.h +1 -1
index 8237636d83fb..726cddc1b3e8 100644
@@ -1,4 +1,4 @@
-/* This file is legitimately included multiple times. */
+/* This file is intended to be included multiple times. */
 /* #ifndef ASM_GENERIC_PERFC_DEFN_H */
 /* #define ASM_GENERIC_PERFC_DEFN_H */
 
xen/include/xen/perfc_defn.h +1 -1
index a987d80dd6f1..afbabad0b3be 100644
@@ -1,4 +1,4 @@
-/* This file is legitimately included multiple times. */
+/* This file is intended to be included multiple times. */
 /*#ifndef __XEN_PERFC_DEFN_H__*/
 /*#define __XEN_PERFC_DEFN_H__*/
 

base-commit: 83e043ee72b8c2fe1d620d137c20a2ffb040da01

Signature · 1 line
2.39.5
#2 lore raw

Hi,

Quoted 4 lines · Stefano Stabellini
Quoted 3 lines · Andrew Cooper

The use of "legitimately" mixes the concepts of "it was designed to do this" and "it was correct to do this".

Quoted 8 lines
Quoted 6 lines

The latter in particular can go stale. "intended" is a better way of phrasing this.

No functional change.

Going through my email, I noticed this patch was not committed. I wonder if there was any reason?

Cheers,

Signature · 1 line
Julien Grall
#3 lore raw
Quoted 17 lines · Julien Grall

Hi,

Quoted 14 lines · Stefano Stabellini
Quoted 11 lines · Andrew Cooper

The use of "legitimately" mixes the concepts of "it was designed to do this"
and "it was correct to do this".

The latter in particular can go stale.  "intended" is a better way of phrasing
this.

No functional change.

Thanks.

Quoted 3 lines

Going through my email, I noticed this patch was not committed. I wonder if there was any reason?

Urgh, it was supposed to go in ahead of 3da2149cf4dc6 ("x86/IDT:
Generate bsp_idt[] at build time") which uses the new format.

Also ahead of XSN-2, although the part needing this has been deferred for the meantime.

But eclair is still non-blocking on D4.10, hence why staging is happy.

I'll pick this up in my next sweep.

~Andrew