[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/6] xen/arm: add inclusion guards


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Date: Fri, 16 May 2025 16:21:25 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uvsiHvmuEqOockd22z8vSZlAwyTxhLLN35xLes32HHk=; b=tp3TjxnJDa5NFFMpjApO5BICRidk54UBKfm/JSMzrJu5vtKlNjpW5swyLJo9Hii/kwPfAnMZ+YyckOvwREi7cxuMKvT1Ynk525VKUWEvTNWkeYpe120JSG3NveuxHVU1KdMTA2iSeRJ01pq2g1kDB2HpF0h2JC8upnwn16+5bLnucqOGD1LTHhnFl90uyqm9EU4eE5bu2nDMMPnCpTyG++6OAtf8O3KlrDdccQpyWQvCL2ijlU1YpV7upDr3utkbwyEtwaFjP+LOdgFEzxwfkz8zUhf7rR7ivJ59ee7aoGQv5KY+343anabbndFJ9RsTkptX2SSgcSQ4ZCUTKlWAoQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=miEQldNgMP2AiDsoajvZVOqjGMmV3UmyXf7RS86ZdeAQl89dQJvde7nuQlG/hrFs7O+mSgw2xZqoH2GCBdNxksZ7JAEJOdyL+5yvHZUf3F1A2CXthXcf7ZMJIQ2FCV5Xxt6Kwk+/tQTJKvlqNsb8t4x34VfiE2nwIhl3R0diDT90POQFyP6ueTXwlozkLYkv4s0/Iza65Vutg3vF7ANtdaPN8E47ZqlY3qW5rO2APkKOIlUeaj/9I7XT1TAdPOiHVdh/wG6xCIygSlYBz6nPIpj2yD9KsLYujCVqsEpdT5xSjJy8YQlzCWviLQImzo4gKWbB7R3cMYXSbt8p5dFYtQ==
  • Cc: <andrew.cooper3@xxxxxxxxxx>, <michal.orzel@xxxxxxx>, <jbeulich@xxxxxxxx>, <julien@xxxxxxx>, <roger.pau@xxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <bertrand.marquis@xxxxxxx>, Federico Serafini <federico.serafini@xxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Fri, 16 May 2025 23:21:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Federico Serafini <federico.serafini@xxxxxxxxxxx>

MISRA C Directive 4.10 states that:
"Precautions shall be taken in order to prevent the contents of a
header file being included more than once".

Add inclusion guards where missing to address violations of the
guideline.

Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
---
 xen/arch/arm/efi/efi-boot.h        | 6 ++++++
 xen/arch/arm/include/asm/efibind.h | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h
index dcad46ca72..d2a09ad3a1 100644
--- a/xen/arch/arm/efi/efi-boot.h
+++ b/xen/arch/arm/efi/efi-boot.h
@@ -3,6 +3,10 @@
  * is intended to be included by common/efi/boot.c _only_, and
  * therefore can define arch specific global variables.
  */
+
+#ifndef ARM_EFI_BOOT_H
+#define ARM_EFI_BOOT_H
+
 #include <xen/device_tree.h>
 #include <xen/libfdt/libfdt.h>
 #include <asm/setup.h>
@@ -1003,6 +1007,8 @@ static void __init efi_arch_flush_dcache_area(const void 
*vaddr, UINTN size)
     __flush_dcache_area(vaddr, size);
 }
 
+#endif /* ARM_EFI_BOOT_H */
+
 /*
  * Local variables:
  * mode: C
diff --git a/xen/arch/arm/include/asm/efibind.h 
b/xen/arch/arm/include/asm/efibind.h
index 09dca7a8c9..92b8bad0bb 100644
--- a/xen/arch/arm/include/asm/efibind.h
+++ b/xen/arch/arm/include/asm/efibind.h
@@ -1,2 +1,7 @@
+#ifndef ARM_EFIBIND_H
+#define ARM_EFIBIND_H
+
 #include <xen/types.h>
 #include <asm/arm64/efibind.h>
+
+#endif /* ARM_EFIBIND_H */
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.