On 12.09.2023 11:36, Simone Ballarin wrote: > --- a/xen/arch/x86/efi/runtime.h > +++ b/xen/arch/x86/efi/runtime.h > @@ -1,3 +1,6 @@ > +#ifndef __X86_EFI_RUNTIME_H__ > +#define __X86_EFI_RUNTIME_H__ > + > #include <xen/domain_page.h> > #include <xen/mm.h> > #include <asm/atomic.h> > @@ -17,3 +20,5 @@ void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t > l4e) > } > } > #endif > + > +#endif /* __X86_EFI_RUNTIME_H__ */
Leaving aside that I remain unconvinced of the usefulness of these in (at least some) private headers, I think there's a naming issue to be solved first: How do we distinguish guards of headers in xen/include/ and xen/arch/*/include/ from ones living elsewhere? If we don't set forth a rule, the guard above might be re-used in a hypothetical xen/arch/x86/include/asm/efi/runtime.h, with potentially interesting effects. At a first glance it might work to simply omit "component" identifiers, i.e. just use __RUNTIME_H__ here. Provided suitable prefixes are used in all non-private headers. But I may of course be overlooking pitfalls ... Jan
