From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Stefano Stabellini <stefano.stabellini@amd.com>,
xen-devel@lists.xenproject.org
Cc: michal.orzel@amd.com, jbeulich@suse.com, julien@xen.org,
roger.pau@citrix.com, sstabellini@kernel.org,
bertrand.marquis@arm.com,
Federico Serafini <federico.serafini@bugseng.com>
Subject: Re: [PATCH 6/6] automation/eclair: update configuration of D4.10
Date: Sat, 17 May 2025 00:57:22 +0100 [thread overview]
Message-ID: <5c2aa885-8877-4708-90cc-d65a76b729b3@citrix.com> (raw)
In-Reply-To: <20250516232130.835779-6-stefano.stabellini@amd.com>
On 17/05/2025 12:21 am, Stefano Stabellini wrote:
> diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl
> index 9c67358d46..3fb6d9f971 100644
> --- a/automation/eclair_analysis/ECLAIR/deviations.ecl
> +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
> @@ -72,11 +72,19 @@ they are not instances of commented-out code."
> -config=MC3A2.D4.3,reports+={deliberate, "any_area(any_loc(file(arm64_bitops))&&context(name(int_clear_mask16)))"}
> -doc_end
>
> --doc_begin="Files that are intended to be included more than once do not need to
> -conform to the directive."
> +-doc_begin="Files that are intended to be included more than once (and have
> +a comment that says this explicitly) do not need to conform to the directive."
> -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(^.*Explicitly intended for multiple inclusion.*$, begin-3))"}
xen.git/xen$ git grep "Explicitly intended for multiple"
arch/x86/include/asm/cpufeatures.h:2: * Explicitly intended for multiple
inclusion.
I'd suggest altering that one file, rather than adding an special
exclusion pattern.
> +-config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* Generated file, do not edit! \\*/$, begin-2))"}
> -config=MC3A2.D4.10,reports+={safe, "first_area(text(^/\\* Generated file, do not edit! \\*/$, begin-3))"}
These seem to only differ by the begin-$N. Why doesn't the regex work
in both cases?
> --config=MC3A2.D4.10,reports+={safe, "all_area(all_loc(file(^xen/include/generated/autoconf.h$)))"}
> +-doc_end
> +
> +-doc_begin="Autogenerated files that do not need to conform to the directive."
> +-config=MC3A2.D4.10,reports+={safe, "all_area(all_loc(file(^xen/include/generated/autoconf\\.h$)))"}
> +-config=MC3A2.D4.10,reports+={safe, "all_area(all_loc(file(^xen/include/xen/compile\\.h$)))"}
I see your exception, and raise you some sed.
diff --git a/xen/include/xen/compile.h.in b/xen/include/xen/compile.h.in
index 3151d1e7d1bf..9206341ba692 100644
--- a/xen/include/xen/compile.h.in
+++ b/xen/include/xen/compile.h.in
@@ -1,3 +1,6 @@
+#ifndef XEN_COMPILE_H
+#define XEN_COMPILE_H
+
#define XEN_COMPILE_DATE "@@date@@"
#define XEN_COMPILE_TIME "@@time@@"
#define XEN_COMPILE_BY "@@whoami@@"
diff --git a/xen/tools/process-banner.sed b/xen/tools/process-banner.sed
index 56c76558bcd9..4cf3f9a1163a 100755
--- a/xen/tools/process-banner.sed
+++ b/xen/tools/process-banner.sed
@@ -12,3 +12,8 @@ s_(.*)_"\1\\n"_
# Trailing \ on all but the final line.
$!s_$_ \\_
+
+# Append closing header guard
+$a\
+\
+#endif /* XEN_COMPILE_H */
and now compile.h looks like a normal header.
~Andrew
next prev parent reply other threads:[~2025-05-16 23:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 23:21 [PATCH 0/6] MISRA D4.10: fix header guards Stefano Stabellini
2025-05-16 23:21 ` [PATCH 1/6] xen/arm: add inclusion guards Stefano Stabellini
2025-05-16 23:23 ` Andrew Cooper
2025-05-19 22:25 ` Julien Grall
2025-05-16 23:21 ` [PATCH 2/6] xen/x86: " Stefano Stabellini
2025-05-16 23:24 ` Andrew Cooper
2025-05-16 23:21 ` [PATCH 3/6] xen: " Stefano Stabellini
2025-05-16 23:27 ` Andrew Cooper
2025-05-16 23:21 ` [PATCH 4/6] xen: refactor include guards Stefano Stabellini
2025-05-16 23:29 ` Andrew Cooper
2025-05-17 0:10 ` [PATCH v2 " Stefano Stabellini
2025-05-17 0:13 ` Andrew Cooper
2025-05-16 23:21 ` [PATCH 5/6] x86/asm: refactor inclusion guards Stefano Stabellini
2025-05-17 0:10 ` Andrew Cooper
2025-05-16 23:21 ` [PATCH 6/6] automation/eclair: update configuration of D4.10 Stefano Stabellini
2025-05-16 23:57 ` Andrew Cooper [this message]
2025-05-19 14:13 ` Federico Serafini
2025-05-19 21:36 ` Stefano Stabellini
2025-05-23 15:49 ` Federico Serafini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5c2aa885-8877-4708-90cc-d65a76b729b3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=bertrand.marquis@arm.com \
--cc=federico.serafini@bugseng.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=stefano.stabellini@amd.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.