Message ID | 868ede5a23489e018e272188edfbee572d1ad393.1710145041.git.simone.ballarin@bugseng.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen: address violation of MISRA C:2012 Directive 4.10 | expand |
On 11.03.2024 09:59, Simone Ballarin wrote: > --- 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 XEN_ARCH_ARM_EFI_EFI_BOOT_H > +#define XEN_ARCH_ARM_EFI_EFI_BOOT_H Related to my question raised against the cover letter, what does the XEN_ prefix gain us here? All building of the hypervisor binaries happens inside the xen/ subtree. Jan
On 11/03/24 11:10, Jan Beulich wrote: > On 11.03.2024 09:59, Simone Ballarin wrote: >> --- 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 XEN_ARCH_ARM_EFI_EFI_BOOT_H >> +#define XEN_ARCH_ARM_EFI_EFI_BOOT_H > > Related to my question raised against the cover letter, what does the > XEN_ prefix gain us here? All building of the hypervisor binaries > happens inside the xen/ subtree. > > Jan what do you thing about adding this rule: arch/<arch>/<subdir>/<filename> -> <ARCH>_<subdir>_<filename>_H ?
On 11.03.2024 13:07, Simone Ballarin wrote: > On 11/03/24 11:10, Jan Beulich wrote: >> On 11.03.2024 09:59, Simone Ballarin wrote: >>> --- 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 XEN_ARCH_ARM_EFI_EFI_BOOT_H >>> +#define XEN_ARCH_ARM_EFI_EFI_BOOT_H >> >> Related to my question raised against the cover letter, what does the >> XEN_ prefix gain us here? All building of the hypervisor binaries >> happens inside the xen/ subtree. > > what do you thing about adding this rule: > arch/<arch>/<subdir>/<filename> -> <ARCH>_<subdir>_<filename>_H > ? Yet better - even the ARCH_ is gone then. Of course we want to then be reasonably sure no arch appears with a name matching some of the other top-level (under xen/) subdirs. Jan
diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h index 0cb29f90a0..580859fecd 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 XEN_ARCH_ARM_EFI_EFI_BOOT_H +#define XEN_ARCH_ARM_EFI_EFI_BOOT_H + #include <xen/device_tree.h> #include <xen/libfdt/libfdt.h> #include <asm/setup.h> @@ -992,6 +996,8 @@ static void __init efi_arch_flush_dcache_area(const void *vaddr, UINTN size) __flush_dcache_area(vaddr, size); } +#endif /* XEN_ARCH_ARM_EFI_EFI_BOOT_H */ + /* * Local variables: * mode: C