]> xenbits.xensource.com Git - xen.git/commitdiff
misra: add deviation for headers that explicitly avoid guards
authorSimone Ballarin <simone.ballarin@bugseng.com>
Tue, 30 Jul 2024 09:54:11 +0000 (11:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 30 Jul 2024 09:54:11 +0000 (11:54 +0200)
Some headers, under specific circumstances (documented in a comment at
the beginning of the file), explicitly do not have strict inclusion
guards: the caller is responsible for including them correctly.

These files are not supposed to comply with Directive 4.10:
"Precautions shall be taken in order to prevent the contents of a header
file being included more than once"

This patch adds deviation cooments for headers that avoid guards.

Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com>
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Signed-off-by: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
docs/misra/safe.json
xen/include/public/arch-x86/cpufeatureset.h
xen/include/public/errno.h

index 3f18ef401c7d6b55e7208b0566737406fdf52ed3..44d1c4890e8ca2704c689801f1ac6752285e2ae6 100644 (file)
         },
         {
             "id": "SAF-8-safe",
+            "analyser": {
+                "eclair": "MC3R1.D4.10"
+            },
+            "name": "Dir 4.10: headers that leave it up to the caller to include them correctly",
+            "text": "Headers that deliberatively leave the responsability of their correct inclusion to the caller are allowed."
+        },
+        {
+            "id": "SAF-9-safe",
             "analyser": {},
             "name": "Sentinel",
             "text": "Next ID to be used"
index d9eba5e9a714a2bfe9a7bd0727b4c6edcb8d833c..3962ba9342a3652448014fa6897353126aff11dc 100644 (file)
@@ -23,6 +23,7 @@
  * their XEN_CPUFEATURE() being appropriate in the included context.
  */
 
+/* SAF-8-safe inclusion procedure left to caller */
 #ifndef XEN_CPUFEATURE
 
 /*
index 5a78a7607c0ddac82ea49a363a0a9fcfe2b885ae..b9fc6762fbb6c7cf14340e7db8ec33ab5881ed50 100644 (file)
@@ -17,6 +17,7 @@
  * will unilaterally #undef XEN_ERRNO().
  */
 
+/* SAF-8-safe inclusion procedure left to caller */
 #ifndef XEN_ERRNO
 
 /*