From patchwork Mon Mar 11 08:59:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simone Ballarin X-Patchwork-Id: 13588380 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C133BC54E66 for ; Mon, 11 Mar 2024 09:00:36 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.691274.1077149 (Exim 4.92) (envelope-from ) id 1rjbWD-0001AV-0V; Mon, 11 Mar 2024 09:00:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 691274.1077149; Mon, 11 Mar 2024 09:00:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rjbWC-00016O-IV; Mon, 11 Mar 2024 09:00:24 +0000 Received: by outflank-mailman (input) for mailman id 691274; Mon, 11 Mar 2024 09:00:20 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rjbW8-0006j9-7r for xen-devel@lists.xenproject.org; Mon, 11 Mar 2024 09:00:20 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c8a8545d-df85-11ee-a1ee-f123f15fe8a2; Mon, 11 Mar 2024 10:00:18 +0100 (CET) Received: from beta.station (net-93-144-106-196.cust.vodafonedsl.it [93.144.106.196]) by support.bugseng.com (Postfix) with ESMTPSA id 0C5F54EE0C99; Mon, 11 Mar 2024 10:00:18 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c8a8545d-df85-11ee-a1ee-f123f15fe8a2 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, sstabellini@kernel.org, Maria Celeste Cesario , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v3 14/16] xen/x86: address violations of MISRA C:2012 Directive 4.10 Date: Mon, 11 Mar 2024 09:59:23 +0100 Message-Id: <305d6474a84e16d44c193a93e2c2ca91d6dd0f7e.1710145041.git.simone.ballarin@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 From: Maria Celeste Cesario Edit 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. --- Commit introduced in v3 Signed-off-by: Maria Celeste Cesario Signed-off-by: Simone Ballarin Reviewed-by: Stefano Stabellini --- xen/arch/x86/include/asm/domain.h | 6 +++--- xen/arch/x86/include/asm/event.h | 6 +++--- xen/arch/x86/include/asm/grant_table.h | 6 +++--- xen/arch/x86/include/asm/io.h | 6 +++--- xen/arch/x86/include/asm/irq.h | 6 +++--- xen/arch/x86/include/asm/smp.h | 6 +++--- xen/arch/x86/include/asm/spinlock.h | 6 +++--- xen/arch/x86/include/asm/system.h | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/xen/arch/x86/include/asm/domain.h b/xen/arch/x86/include/asm/domain.h index 622d22bef2..cb7b01f7ef 100644 --- a/xen/arch/x86/include/asm/domain.h +++ b/xen/arch/x86/include/asm/domain.h @@ -1,5 +1,5 @@ -#ifndef __ASM_DOMAIN_H__ -#define __ASM_DOMAIN_H__ +#ifndef ASM_X86_DOMAIN_H +#define ASM_X86_DOMAIN_H #include #include @@ -780,7 +780,7 @@ struct arch_vcpu_io { /* Maxphysaddr supportable by the paging infrastructure. */ unsigned int domain_max_paddr_bits(const struct domain *d); -#endif /* __ASM_DOMAIN_H__ */ +#endif /* ASM_X86_DOMAIN_H */ /* * Local variables: diff --git a/xen/arch/x86/include/asm/event.h b/xen/arch/x86/include/asm/event.h index 5e09ede6d7..c0b6088c91 100644 --- a/xen/arch/x86/include/asm/event.h +++ b/xen/arch/x86/include/asm/event.h @@ -6,8 +6,8 @@ * */ -#ifndef __ASM_EVENT_H__ -#define __ASM_EVENT_H__ +#ifndef ASM_X86_EVENT_H +#define ASM_X86_EVENT_H #include @@ -53,4 +53,4 @@ static inline bool arch_virq_is_global(unsigned int virq) (pv_shim && (chn)->port && (chn)->state == ECS_RESERVED) #endif -#endif +#endif /* ASM_X86_EVENT_H */ diff --git a/xen/arch/x86/include/asm/grant_table.h b/xen/arch/x86/include/asm/grant_table.h index 5c23cec90c..2468f21ad6 100644 --- a/xen/arch/x86/include/asm/grant_table.h +++ b/xen/arch/x86/include/asm/grant_table.h @@ -4,8 +4,8 @@ * Copyright (c) 2004-2005 K A Fraser */ -#ifndef __ASM_GRANT_TABLE_H__ -#define __ASM_GRANT_TABLE_H__ +#ifndef ASM_X86_GRANT_TABLE_H +#define ASM_X86_GRANT_TABLE_H #include @@ -72,4 +72,4 @@ static inline void gnttab_clear_flags(struct domain *d, #define gnttab_need_iommu_mapping(d) \ (!paging_mode_translate(d) && need_iommu_pt_sync(d)) -#endif /* __ASM_GRANT_TABLE_H__ */ +#endif /* ASM_X86_GRANT_TABLE_H */ diff --git a/xen/arch/x86/include/asm/io.h b/xen/arch/x86/include/asm/io.h index 9b19d2d389..9371784584 100644 --- a/xen/arch/x86/include/asm/io.h +++ b/xen/arch/x86/include/asm/io.h @@ -1,5 +1,5 @@ -#ifndef _ASM_IO_H -#define _ASM_IO_H +#ifndef ASM_X86_IO_H +#define ASM_X86_IO_H #include #include @@ -57,4 +57,4 @@ struct cpu_user_regs; unsigned int ioemul_handle_proliant_quirk( uint8_t opcode, char *io_emul_stub, const struct cpu_user_regs *regs); -#endif +#endif /* ASM_X86_IO_H */ diff --git a/xen/arch/x86/include/asm/irq.h b/xen/arch/x86/include/asm/irq.h index 082a3d6bbc..f8139842b4 100644 --- a/xen/arch/x86/include/asm/irq.h +++ b/xen/arch/x86/include/asm/irq.h @@ -1,5 +1,5 @@ -#ifndef _ASM_HW_IRQ_H -#define _ASM_HW_IRQ_H +#ifndef ASM_X86_IRQ_H +#define ASM_X86_IRQ_H /* (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar */ @@ -192,4 +192,4 @@ int allocate_and_map_gsi_pirq(struct domain *d, int index, int *pirq_p); int allocate_and_map_msi_pirq(struct domain *d, int index, int *pirq_p, int type, struct msi_info *msi); -#endif /* _ASM_HW_IRQ_H */ +#endif /* ASM_X86_IRQ_H */ diff --git a/xen/arch/x86/include/asm/smp.h b/xen/arch/x86/include/asm/smp.h index c8c7960134..cdfe9ea96f 100644 --- a/xen/arch/x86/include/asm/smp.h +++ b/xen/arch/x86/include/asm/smp.h @@ -1,5 +1,5 @@ -#ifndef __ASM_SMP_H -#define __ASM_SMP_H +#ifndef ASM_X86_SMP_H +#define ASM_X86_SMP_H /* * We need the APIC definitions automatically as part of 'smp.h' @@ -81,4 +81,4 @@ void *cpu_alloc_stack(unsigned int cpu); #endif /* !__ASSEMBLY__ */ -#endif +#endif /* ASM_X86_SMP_H */ diff --git a/xen/arch/x86/include/asm/spinlock.h b/xen/arch/x86/include/asm/spinlock.h index 56f6095752..2a86560343 100644 --- a/xen/arch/x86/include/asm/spinlock.h +++ b/xen/arch/x86/include/asm/spinlock.h @@ -1,5 +1,5 @@ -#ifndef __ASM_SPINLOCK_H -#define __ASM_SPINLOCK_H +#ifndef ASM_X86_SPINLOCK_H +#define ASM_X86_SPINLOCK_H #define _raw_read_unlock(l) \ BUILD_BUG_ON(sizeof((l)->lock) != 4); /* Clang doesn't support %z in asm. */ \ @@ -24,4 +24,4 @@ arch_lock_signal(); \ }) -#endif /* __ASM_SPINLOCK_H */ +#endif /* ASM_X86_SPINLOCK_H */ diff --git a/xen/arch/x86/include/asm/system.h b/xen/arch/x86/include/asm/system.h index 73cb16ca68..12e8b974b1 100644 --- a/xen/arch/x86/include/asm/system.h +++ b/xen/arch/x86/include/asm/system.h @@ -1,5 +1,5 @@ -#ifndef __ASM_SYSTEM_H -#define __ASM_SYSTEM_H +#ifndef ASM_X86_SYSTEM_H +#define ASM_X86_SYSTEM_H #include #include @@ -269,4 +269,4 @@ void load_system_tables(void); void percpu_traps_init(void); void subarch_percpu_traps_init(void); -#endif +#endif /* ASM_X86_SYSTEM_H */