[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN PATCH 03/13] xen/arm: address violations of MISRA C:2012 Directive 4.10
Add or move 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"). Inclusion guards must appear at the beginning of the headers (comments are permitted anywhere). Mechanical change. Signed-off-by: Simone Ballarin <simone.ballarin@xxxxxxxxxxx> --- xen/arch/arm/efi/efi-boot.h | 6 ++++++ xen/arch/arm/include/asm/hypercall.h | 6 +++--- xen/arch/arm/include/asm/iocap.h | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h index 1c3640bb65..aba522ead5 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_EFI_BOOT_H__ +#define __ARM_EFI_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_EFI_BOOT_H__*/ + /* * Local variables: * mode: C diff --git a/xen/arch/arm/include/asm/hypercall.h b/xen/arch/arm/include/asm/hypercall.h index ccd26c5184..4f4d96f1f2 100644 --- a/xen/arch/arm/include/asm/hypercall.h +++ b/xen/arch/arm/include/asm/hypercall.h @@ -1,10 +1,10 @@ +#ifndef __ASM_ARM_HYPERCALL_H__ +#define __ASM_ARM_HYPERCALL_H__ + #ifndef __XEN_HYPERCALL_H__ #error "asm/hypercall.h should not be included directly - include xen/hypercall.h instead" #endif -#ifndef __ASM_ARM_HYPERCALL_H__ -#define __ASM_ARM_HYPERCALL_H__ - #include <public/domctl.h> /* for arch_do_domctl */ long subarch_do_domctl(struct xen_domctl *domctl, struct domain *d, diff --git a/xen/arch/arm/include/asm/iocap.h b/xen/arch/arm/include/asm/iocap.h index 276fefbc59..4db1b16839 100644 --- a/xen/arch/arm/include/asm/iocap.h +++ b/xen/arch/arm/include/asm/iocap.h @@ -1,10 +1,10 @@ -#ifndef __X86_IOCAP_H__ -#define __X86_IOCAP_H__ +#ifndef __ASM_ARM_IOCAP_H__ +#define __ASM_ARM_IOCAP_H__ #define cache_flush_permitted(d) \ (!rangeset_is_empty((d)->iomem_caps)) -#endif +#endif /* __ASM_ARM_IOCAP_H__ */ /* * Local variables: -- 2.34.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |