Message ID | e58d82c2a2c77c7451ae9bc70b093f2c5575d83f.1694510856.git.simone.ballarin@bugseng.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | address violations of MISRA C:2012 Directive 4.10 | expand |
On Tue, 12 Sep 2023, Simone Ballarin wrote: > Add inclusion guard 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> Acked-by: Stefano Stabellini <sstabellini@kernel.org> > --- > Changes in v2: > - drop changes in xen/arch/arm/include/asm/hypercall.h > - drop changes in xen/arch/arm/include/asm/iocap.h since they are > not related with the directive > --- > xen/arch/arm/efi/efi-boot.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h > index 1c3640bb65..aaa468f186 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 > -- > 2.34.1 >
diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h index 1c3640bb65..aaa468f186 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
Add inclusion guard 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> --- Changes in v2: - drop changes in xen/arch/arm/include/asm/hypercall.h - drop changes in xen/arch/arm/include/asm/iocap.h since they are not related with the directive --- xen/arch/arm/efi/efi-boot.h | 6 ++++++ 1 file changed, 6 insertions(+)