[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/asm: refactor inclusion guards
commit 6fc02ebdd053856221f37ba5306232ac1575332d Author: Federico Serafini <federico.serafini@xxxxxxxxxxx> AuthorDate: Fri May 16 16:21:29 2025 -0700 Commit: Stefano Stabellini <stefano.stabellini@xxxxxxx> CommitDate: Fri May 16 17:21:45 2025 -0700 x86/asm: refactor inclusion guards MISRA C Directive 4.10 states that "Precautions shall be taken in order to prevent the contents of a header file being included more than once". Refactor inclusion guards to address a violation of Directive 4.10 and follow CODING_STYLE. Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index bedb97cbee..ce724a9daa 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -261,17 +261,17 @@ $(objtree)/arch/x86/include/asm/asm-macros.h: $(obj)/asm-macros.i $(src)/Makefil $(call filechk,asm-macros.h) define filechk_asm-macros.h + echo '#ifndef X86_MACROS_H'; \ + echo '#define X86_MACROS_H'; \ echo '#if 0'; \ echo '.if 0'; \ echo '#endif'; \ - echo '#ifndef __ASM_MACROS_H__'; \ - echo '#define __ASM_MACROS_H__'; \ echo 'asm ( ".include \"$@\"" );'; \ - echo '#endif /* __ASM_MACROS_H__ */'; \ echo '#if 0'; \ echo '.endif'; \ cat $<; \ - echo '#endif' + echo '#endif'; \ + echo '#endif /* X86_MACROS_H */' endef $(obj)/efi.lds: AFLAGS-y += -DEFI -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |