All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simone Ballarin <simone.ballarin@bugseng.com>
To: xen-devel@lists.xenproject.org
Cc: consulting@bugseng.com, sstabellini@kernel.org,
	Simone Ballarin <simone.ballarin@bugseng.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Wei Liu <wl@xen.org>,
	Maria Celeste Cesario <maria.celeste.cesario@bugseng.com>
Subject: [XEN PATCH v3 07/16] xen/common: address violations of MISRA C:2012 Directive 4.10
Date: Mon, 11 Mar 2024 09:59:16 +0100	[thread overview]
Message-ID: <c76b93f2e02901f2ff006f19413b113e8e0a2925.1710145041.git.simone.ballarin@bugseng.com> (raw)
In-Reply-To: <cover.1710145041.git.simone.ballarin@bugseng.com>

Add inclusion guards to address violations of
MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order
to prevent the contents of a header file being included more than
once").

Mechanical change.

Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com>
Signed-off-by: Maria Celeste Cesario  <maria.celeste.cesario@bugseng.com>

---
Changes in v3:
- remove trailing underscores
- change inclusion guard name to adhere to the new standard
Changes in v2:
- drop changes in C files
---
 xen/common/decompress.h    | 5 +++++
 xen/common/event_channel.h | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/xen/common/decompress.h b/xen/common/decompress.h
index e8195b353a..41848274ab 100644
--- a/xen/common/decompress.h
+++ b/xen/common/decompress.h
@@ -1,3 +1,6 @@
+#ifndef XEN_COMMON_DECOMPRESS_H
+#define XEN_COMMON_DECOMPRESS_H
+
 #ifdef __XEN__
 
 #include <xen/cache.h>
@@ -23,3 +26,5 @@
 #define large_free free
 
 #endif
+
+#endif /* XEN_COMMON_DECOMPRESS_H */
diff --git a/xen/common/event_channel.h b/xen/common/event_channel.h
index 45219ca67c..a23e39a713 100644
--- a/xen/common/event_channel.h
+++ b/xen/common/event_channel.h
@@ -1,5 +1,8 @@
 /* Event channel handling private header. */
 
+#ifndef XEN_COMMON_EVENT_CHANNEL_H
+#define XEN_COMMON_EVENT_CHANNEL_H
+
 #include <xen/event.h>
 
 static inline unsigned int max_evtchns(const struct domain *d)
@@ -52,6 +55,8 @@ int evtchn_fifo_init_control(struct evtchn_init_control *init_control);
 int evtchn_fifo_expand_array(const struct evtchn_expand_array *expand_array);
 void evtchn_fifo_destroy(struct domain *d);
 
+#endif /* XEN_COMMON_EVENT_CHANNEL_H */
+
 /*
  * Local variables:
  * mode: C
-- 
2.34.1



  parent reply	other threads:[~2024-03-11  9:00 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11  8:59 [XEN PATCH v3 00/16] xen: address violation of MISRA C:2012 Directive 4.10 Simone Ballarin
2024-03-11  8:59 ` [XEN PATCH v3 01/16] misra: add deviation for headers that explicitly avoid guards Simone Ballarin
2024-03-11 10:02   ` Jan Beulich
2024-03-14 22:55     ` Stefano Stabellini
2024-03-15  6:59       ` Jan Beulich
2024-03-16  0:34         ` Stefano Stabellini
2024-03-11  8:59 ` [XEN PATCH v3 02/16] misra: modify deviations for empty and generated headers Simone Ballarin
2024-03-14 22:57   ` Stefano Stabellini
2024-03-11  8:59 ` [XEN PATCH v3 03/16] misra: add deviations for direct inclusion guards Simone Ballarin
2024-03-11 10:08   ` Jan Beulich
2024-03-11 12:00     ` Simone Ballarin
2024-03-11 13:56       ` Jan Beulich
2024-03-11 14:14         ` Simone Ballarin
2024-03-14 22:59           ` Stefano Stabellini
2024-03-15  9:19             ` Jan Beulich
2024-03-16  0:43               ` Stefano Stabellini
2024-03-18  8:06                 ` Jan Beulich
2024-03-19  3:34                   ` Stefano Stabellini
2024-03-19  7:45                     ` Jan Beulich
2024-03-11  8:59 ` [XEN PATCH v3 04/16] xen/arm: address violations of MISRA C:2012 Directive 4.10 Simone Ballarin
2024-03-11 10:10   ` Jan Beulich
2024-03-11 12:07     ` Simone Ballarin
2024-03-11 14:00       ` Jan Beulich
2024-03-11  8:59 ` [XEN PATCH v3 05/16] xen/x86: " Simone Ballarin
2024-03-12  8:16   ` Jan Beulich
2024-03-11  8:59 ` [XEN PATCH v3 06/16] x86/EFI: " Simone Ballarin
2024-03-14 23:02   ` Stefano Stabellini
2024-03-11  8:59 ` Simone Ballarin [this message]
2024-03-14 23:03   ` [XEN PATCH v3 07/16] xen/common: " Stefano Stabellini
2024-03-11  8:59 ` [XEN PATCH v3 08/16] xen/efi: " Simone Ballarin
2024-03-14 23:04   ` Stefano Stabellini
2024-03-11  8:59 ` [XEN PATCH v3 09/16] xen: " Simone Ballarin
2024-03-12  8:21   ` Jan Beulich
2024-03-12 10:22   ` Julien Grall
2024-03-14 23:07   ` Stefano Stabellini
2024-03-11  8:59 ` [XEN PATCH v3 10/16] x86/asm: " Simone Ballarin
2024-03-12  8:32   ` Jan Beulich
2024-03-11  8:59 ` [XEN PATCH v3 11/16] xen/arm: " Simone Ballarin
2024-03-14 23:12   ` Stefano Stabellini
2024-03-11  8:59 ` [XEN PATCH v3 12/16] xen: " Simone Ballarin
2024-03-12 14:44   ` Jan Beulich
2024-03-11  8:59 ` [XEN PATCH v3 13/16] xen: add deviations for MISRA C.2012 " Simone Ballarin
2024-03-12 14:58   ` Jan Beulich
2024-03-11  8:59 ` [XEN PATCH v3 14/16] xen/x86: address violations of MISRA C:2012 " Simone Ballarin
2024-03-12 15:54   ` Jan Beulich
2024-03-14 23:19     ` Stefano Stabellini
2024-03-11  8:59 ` [XEN PATCH v3 15/16] x86/mtrr: " Simone Ballarin
2024-03-12 15:55   ` Jan Beulich
2024-03-14 13:00   ` Jan Beulich
2024-03-11  8:59 ` [XEN PATCH v3 16/16] xen/lz4: " Simone Ballarin
2024-03-12 15:56   ` Jan Beulich
2024-03-11  9:59 ` [XEN PATCH v3 00/16] xen: address violation " Jan Beulich
2024-03-11 11:41   ` Simone Ballarin
2024-03-11 13:27     ` Jan Beulich

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=c76b93f2e02901f2ff006f19413b113e8e0a2925.1710145041.git.simone.ballarin@bugseng.com \
    --to=simone.ballarin@bugseng.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=consulting@bugseng.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=maria.celeste.cesario@bugseng.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --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.