unify header guards
Subsystems (4)
v2 cover unify header guards
This is an extension of "s390x: unify header guards" to the rest of kvm-unit-tests. I tried to choose a pattern that minimizes the changes; most of them are for s390x and x86.
v1->v2:
- change the patterns and document them
- change other architectures and architecture-independent code as well
Cornelia Huck (7):
README.md: add guideline for header guards format
lib: unify header guards
asm-generic: unify header guards
arm: unify header guards
powerpc: unify header guards
s390x: unify header guards
x86: unify header guards
README.md | 9 +++++++++ lib/alloc_page.h | 4 ++-- lib/arm/asm/assembler.h | 6 +++--- lib/arm64/asm/assembler.h | 6 +++--- lib/asm-generic/atomic.h | 4 ++-- lib/asm-generic/barrier.h | 6 +++--- lib/asm-generic/memory_areas.h | 4 ++-- lib/asm-generic/pci-host-bridge.h | 4 ++-- lib/libcflat.h | 4 ++-- lib/list.h | 4 ++-- lib/pci-edu.h | 4 ++-- lib/pci-host-generic.h | 4 ++-- lib/s390x/asm/arch_def.h | 4 ++-- lib/s390x/asm/barrier.h | 4 ++-- lib/s390x/asm/cpacf.h | 6 +++--- lib/s390x/asm/facility.h | 4 ++-- lib/s390x/asm/float.h | 4 ++-- lib/s390x/asm/mem.h | 4 ++-- lib/s390x/asm/sigp.h | 6 +++--- lib/s390x/asm/spinlock.h | 4 ++-- lib/s390x/asm/time.h | 4 ++-- lib/s390x/asm/uv.h | 4 ++-- lib/s390x/css.h | 4 ++-- lib/s390x/interrupt.h | 4 ++-- lib/s390x/mmu.h | 4 ++-- lib/s390x/sclp.h | 6 +++--- lib/s390x/sie.h | 6 +++--- lib/s390x/smp.h | 4 ++-- lib/s390x/uv.h | 4 ++-- lib/s390x/vm.h | 6 +++--- lib/setjmp.h | 4 ++-- lib/string.h | 6 +++--- lib/vmalloc.h | 4 ++-- lib/x86/acpi.h | 4 ++-- lib/x86/apic-defs.h | 6 +++--- lib/x86/apic.h | 4 ++-- lib/x86/asm/barrier.h | 4 ++-- lib/x86/asm/debugreg.h | 6 +++--- lib/x86/asm/io.h | 4 ++-- lib/x86/asm/memory_areas.h | 4 ++-- lib/x86/asm/page.h | 4 ++-- lib/x86/asm/pci.h | 4 ++-- lib/x86/asm/spinlock.h | 4 ++-- lib/x86/asm/stack.h | 4 ++-- lib/x86/atomic.h | 4 ++-- lib/x86/delay.h | 4 ++-- lib/x86/desc.h | 4 ++-- lib/x86/fault_test.h | 4 ++-- lib/x86/fwcfg.h | 4 ++-- lib/x86/intel-iommu.h | 4 ++-- lib/x86/isr.h | 4 ++-- lib/x86/msr.h | 6 +++--- lib/x86/processor.h | 4 ++-- lib/x86/smp.h | 4 ++-- lib/x86/usermode.h | 4 ++-- lib/x86/vm.h | 4 ++-- powerpc/spapr.h | 6 +++--- s390x/sthyi.h | 4 ++-- x86/hyperv.h | 4 ++-- x86/ioram.h | 4 ++-- x86/kvmclock.h | 4 ++-- x86/svm.h | 4 ++-- x86/types.h | 4 ++-- x86/vmx.h | 4 ++-- 64 files changed, 148 insertions(+), 139 deletions(-)
Signature · 1 line
2.31.1
PATCH v2 1/7 README.md: add guideline for header guards format
--- README.md | 9 +++++++++ 1 file changed, 9 insertions(+)
README.md +9 -0
@@ -156,6 +156,15 @@ Exceptions: - While the kernel standard requires 80 columns, we allow up to 120. +Header guards: + +Please try to adhere to adhere to the following patterns when adding +"#ifndef <...> #define <...>" header guards: + ./lib: _HEADER_H_ + ./lib/<ARCH>: _ARCH_HEADER_H_ + ./lib/<ARCH>/asm: _ASMARCH_HEADER_H_ + ./<ARCH>: ARCH_HEADER_H + ## Patches Patches are welcome at the KVM mailing list <[email protected]>.
Signature · 1 line
2.31.1
Re: [kvm-unit-tests PATCH v2 1/7] README.md: add guideline for header guards format
Quoted 10 lines · Cornelia Huck
Signed-off-by Cornelia Huck <[email protected]>--- README.md | 9 +++++++++ 1 file changed, 9 insertions(+)README.md +0
-0
README.md Exceptions: · line 165
Quoted 10 lines
README.md +7
-0@@ -156,6 +156,15 @@ Exceptions: - While the kernel standard requires 80 columns, we allow up to 120. +Header guards: + +Please try to adhere to adhere to the following patterns when adding +"#ifndef <...> #define <...>" header guards: + ./lib: _HEADER_H_ + ./lib/<ARCH>: _ARCH_HEADER_H_ + ./lib/<ARCH>/asm: _ASMARCH_HEADER_H_
I'd have used _ARCH_ASM_HEADER_H_
Signature · 3 lines
Thanks, David / dhildenb
Re: [kvm-unit-tests PATCH v2 1/7] README.md: add guideline for header guards format
Quoted 14 lines · David Hildenbrand
Quoted 13 lines · Cornelia Huck
Signed-off-by Cornelia Huck <[email protected]>--- README.md | 9 +++++++++ 1 file changed, 9 insertions(+)README.md +0
-0@@ -156,6 +156,15 @@ Exceptions: - While the kernel standard requires 80 columns, we allow up to 120.
Quoted 9 lines
README.md Exceptions: · line 165
Quoted 7 lines
README.md +7
-0+Header guards: + +Please try to adhere to adhere to the following patterns when adding +"#ifndef <...> #define <...>" header guards: + ./lib: _HEADER_H_ + ./lib/<ARCH>: _ARCH_HEADER_H_ + ./lib/<ARCH>/asm: _ASMARCH_HEADER_H_I'd have used _ARCH_ASM_HEADER_H_
I had that first, but the pattern I ended up using caused way less churn (this is basically what arm[64] uses.)
Quoted 2 lines
Reviewed-by David Hildenbrand <[email protected]>
Thanks!
Re: [kvm-unit-tests PATCH v2 1/7] README.md: add guideline for header guards format
In reply to Cornelia HuckQuoted 16 lines · Cornelia Huck
Signed-off-by Cornelia Huck <[email protected]>--- README.md | 9 +++++++++ 1 file changed, 9 insertions(+)README.md +2
-0@@ -156,6 +156,15 @@ Exceptions: - While the kernel standard requires 80 columns, we allow up to 120. +Header guards: +
README.md Exceptions: · line 170
Quoted 10 lines
README.md +7
-0+Please try to adhere to adhere to the following patterns when adding +"#ifndef <...> #define <...>" header guards: + ./lib: _HEADER_H_ + ./lib/<ARCH>: _ARCH_HEADER_H_ + ./lib/<ARCH>/asm: _ASMARCH_HEADER_H_ + ./<ARCH>: ARCH_HEADER_H + ## Patches Patches are welcome at the KVM mailing list <[email protected]>.
Re: [kvm-unit-tests PATCH v2 1/7] README.md: add guideline for header guards format
In reply to Cornelia HuckQuoted 10 lines · Cornelia Huck
Signed-off-by Cornelia Huck <[email protected]>--- README.md | 9 +++++++++ 1 file changed, 9 insertions(+)README.md +0
-0
README.md Exceptions: · line 161
Quoted 6 lines
README.md +3
-0@@ -156,6 +156,15 @@ Exceptions: - While the kernel standard requires 80 columns, we allow up to 120. +Header guards: + +Please try to adhere to adhere to the following patterns when adding
Double 'to adhere'
Thanks,
drew
Quoted 12 lines
README.md +6
-0+"#ifndef <...> #define <...>" header guards: + ./lib: _HEADER_H_ + ./lib/<ARCH>: _ARCH_HEADER_H_ + ./lib/<ARCH>/asm: _ASMARCH_HEADER_H_ + ./<ARCH>: ARCH_HEADER_H + ## Patches Patches are welcome at the KVM mailing list <[email protected]>.Signature · 1 line
2.31.1
PATCH v2 2/7 lib: unify header guards
In reply to Cornelia HuckStandardize header guards to _LIB_HEADER_H_.
--- lib/alloc_page.h | 4 ++-- lib/libcflat.h | 4 ++-- lib/list.h | 4 ++-- lib/pci-edu.h | 4 ++-- lib/pci-host-generic.h | 4 ++-- lib/setjmp.h | 4 ++-- lib/string.h | 6 +++--- lib/vmalloc.h | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-)
lib/alloc_page.h +2 -2
@@ -5,8 +5,8 @@* with byte granularity. */ -#ifndef ALLOC_PAGE_H -#define ALLOC_PAGE_H 1 +#ifndef _ALLOC_PAGE_H_ +#define _ALLOC_PAGE_H_#include <stdbool.h> #include <asm/memory_areas.h>
lib/libcflat.h +2 -2
@@ -17,8 +17,8 @@* Authors: Hollis Blanchard <[email protected]> */ -#ifndef __LIBCFLAT_H -#define __LIBCFLAT_H +#ifndef _LIBCFLAT_H_ +#define _LIBCFLAT_H_#ifndef __ASSEMBLY__
lib/list.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef LIST_H -#define LIST_H +#ifndef _LIST_H_ +#define _LIST_H_#include <stdbool.h>
lib/pci-edu.h +2 -2
@@ -12,8 +12,8 @@* Edu device is a virtualized device in QEMU. Please refer to * docs/specs/edu.txt in QEMU repository for EDU device manual. */ -#ifndef __PCI_EDU_H__ -#define __PCI_EDU_H__ +#ifndef _PCI_EDU_H_ +#define _PCI_EDU_H_#include "pci.h" #include "asm/io.h"
lib/pci-host-generic.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef PCI_HOST_GENERIC_H -#define PCI_HOST_GENERIC_H +#ifndef _PCI_HOST_GENERIC_H_ +#define _PCI_HOST_GENERIC_H_/* * PCI host bridge supporting structures and constants *
lib/setjmp.h +2 -2
@@ -4,8 +4,8 @@* This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License version 2. */ -#ifndef LIBCFLAT_SETJMP_H -#define LIBCFLAT_SETJMP_H 1 +#ifndef _LIBCFLAT_SETJMP_H_ +#define _LIBCFLAT_SETJMP_H_ typedef struct jmp_buf_tag { long int regs[8];
lib/string.h +3 -3
@@ -4,8 +4,8 @@* This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License version 2. */ -#ifndef __STRING_H -#define __STRING_H +#ifndef _STRING_H_ +#define _STRING_H_extern size_t strlen (const char *buf);extern size_t strnlen (const char *buf,size_t maxlen);
@@ -23,4 +23,4 @@ extern int memcmp(const void *s1, const void *s2, size_t n);extern void *memmove (void *dest,const void *src,size_t n);extern void *memchr (const void *s,int c,size_t n); -#endif /* _STRING_H */ +#endif /* _STRING_H_ */
lib/vmalloc.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef VMALLOC_H -#define VMALLOC_H 1 +#ifndef _VMALLOC_H_ +#define _VMALLOC_H_#include <asm/page.h>
Signature · 1 line
2.31.1
Re: [kvm-unit-tests PATCH v2 2/7] lib: unify header guards
Quoted 125 lines · Cornelia Huck
Standardize header guards to _LIB_HEADER_H_.
Signed-off-by Cornelia Huck <[email protected]>--- lib/alloc_page.h | 4 ++-- lib/libcflat.h | 4 ++-- lib/list.h | 4 ++-- lib/pci-edu.h | 4 ++-- lib/pci-host-generic.h | 4 ++-- lib/setjmp.h | 4 ++-- lib/string.h | 6 +++--- lib/vmalloc.h | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-)lib/alloc_page.h +2
-2@@ -5,8 +5,8 @@* with byte granularity. */ -#ifndef ALLOC_PAGE_H -#define ALLOC_PAGE_H 1 +#ifndef _ALLOC_PAGE_H_ +#define _ALLOC_PAGE_H_#include <stdbool.h> #include <asm/memory_areas.h> lib/libcflat.h +2
-2@@ -17,8 +17,8 @@* Authors: Hollis Blanchard <[email protected]> */ -#ifndef __LIBCFLAT_H -#define __LIBCFLAT_H +#ifndef _LIBCFLAT_H_ +#define _LIBCFLAT_H_#ifndef __ASSEMBLY__lib/list.h +2
-2@@ -1,5 +1,5 @@ -#ifndef LIST_H -#define LIST_H +#ifndef _LIST_H_ +#define _LIST_H_#include <stdbool.h> lib/pci-edu.h +2
-2@@ -12,8 +12,8 @@* Edu device is a virtualized device in QEMU. Please refer to * docs/specs/edu.txt in QEMU repository for EDU device manual. */ -#ifndef __PCI_EDU_H__ -#define __PCI_EDU_H__ +#ifndef _PCI_EDU_H_ +#define _PCI_EDU_H_#include "pci.h" #include "asm/io.h" lib/pci-host-generic.h +2
-2@@ -1,5 +1,5 @@ -#ifndef PCI_HOST_GENERIC_H -#define PCI_HOST_GENERIC_H +#ifndef _PCI_HOST_GENERIC_H_ +#define _PCI_HOST_GENERIC_H_/* * PCI host bridge supporting structures and constants * lib/setjmp.h +2
-2@@ -4,8 +4,8 @@* This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License version 2. */ -#ifndef LIBCFLAT_SETJMP_H -#define LIBCFLAT_SETJMP_H 1 +#ifndef _LIBCFLAT_SETJMP_H_ +#define _LIBCFLAT_SETJMP_H_ typedef struct jmp_buf_tag { long int regs[8];lib/string.h +3
-3@@ -4,8 +4,8 @@* This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License version 2. */ -#ifndef __STRING_H -#define __STRING_H +#ifndef _STRING_H_ +#define _STRING_H_extern size_t strlen (const char *buf);extern size_t strnlen (const char *buf,size_t maxlen);@@ -23,4 +23,4 @@ extern int memcmp(const void *s1, const void *s2, size_t n);extern void *memmove (void *dest,const void *src,size_t n);extern void *memchr (const void *s,int c,size_t n); -#endif /* _STRING_H */ +#endif /* _STRING_H_ */ lib/vmalloc.h +0
-0
lib/vmalloc.h line 5
Quoted 7 lines
lib/vmalloc.h +2
-2@@ -1,5 +1,5 @@ -#ifndef VMALLOC_H -#define VMALLOC_H 1 +#ifndef _VMALLOC_H_ +#define _VMALLOC_H_#include <asm/page.h>
Signature · 3 lines
Thanks, David / dhildenb
Re: [kvm-unit-tests PATCH v2 2/7] lib: unify header guards
In reply to Cornelia HuckQuoted 13 lines · Cornelia Huck
Standardize header guards to _LIB_HEADER_H_.
Signed-off-by Cornelia Huck <[email protected]>--- lib/alloc_page.h | 4 ++-- lib/libcflat.h | 4 ++-- lib/list.h | 4 ++-- lib/pci-edu.h | 4 ++-- lib/pci-host-generic.h | 4 ++-- lib/setjmp.h | 4 ++-- lib/string.h | 6 +++--- lib/vmalloc.h | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-)
What about lib/argv.h and lib/pci.h?
And there is also this instance of CONFIG_H in lib/config.h generated by configure.
Thanks,
Laurent
Quoted 119 lines
lib/alloc_page.h +2
-2@@ -5,8 +5,8 @@* with byte granularity. */ -#ifndef ALLOC_PAGE_H -#define ALLOC_PAGE_H 1 +#ifndef _ALLOC_PAGE_H_ +#define _ALLOC_PAGE_H_#include <stdbool.h> #include <asm/memory_areas.h> lib/libcflat.h +2
-2@@ -17,8 +17,8 @@* Authors: Hollis Blanchard <[email protected]> */ -#ifndef __LIBCFLAT_H -#define __LIBCFLAT_H +#ifndef _LIBCFLAT_H_ +#define _LIBCFLAT_H_#ifndef __ASSEMBLY__lib/list.h +2
-2@@ -1,5 +1,5 @@ -#ifndef LIST_H -#define LIST_H +#ifndef _LIST_H_ +#define _LIST_H_#include <stdbool.h> lib/pci-edu.h +2
-2@@ -12,8 +12,8 @@* Edu device is a virtualized device in QEMU. Please refer to * docs/specs/edu.txt in QEMU repository for EDU device manual. */ -#ifndef __PCI_EDU_H__ -#define __PCI_EDU_H__ +#ifndef _PCI_EDU_H_ +#define _PCI_EDU_H_#include "pci.h" #include "asm/io.h" lib/pci-host-generic.h +2
-2@@ -1,5 +1,5 @@ -#ifndef PCI_HOST_GENERIC_H -#define PCI_HOST_GENERIC_H +#ifndef _PCI_HOST_GENERIC_H_ +#define _PCI_HOST_GENERIC_H_/* * PCI host bridge supporting structures and constants * lib/setjmp.h +2
-2@@ -4,8 +4,8 @@* This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License version 2. */ -#ifndef LIBCFLAT_SETJMP_H -#define LIBCFLAT_SETJMP_H 1 +#ifndef _LIBCFLAT_SETJMP_H_ +#define _LIBCFLAT_SETJMP_H_ typedef struct jmp_buf_tag { long int regs[8];lib/string.h +3
-3@@ -4,8 +4,8 @@* This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License version 2. */ -#ifndef __STRING_H -#define __STRING_H +#ifndef _STRING_H_ +#define _STRING_H_extern size_t strlen (const char *buf);extern size_t strnlen (const char *buf,size_t maxlen);@@ -23,4 +23,4 @@ extern int memcmp(const void *s1, const void *s2, size_t n);extern void *memmove (void *dest,const void *src,size_t n);extern void *memchr (const void *s,int c,size_t n); -#endif /* _STRING_H */ +#endif /* _STRING_H_ */ lib/vmalloc.h +2
-2@@ -1,5 +1,5 @@ -#ifndef VMALLOC_H -#define VMALLOC_H 1 +#ifndef _VMALLOC_H_ +#define _VMALLOC_H_#include <asm/page.h>
Re: [kvm-unit-tests PATCH v2 2/7] lib: unify header guards
Quoted 15 lines · Laurent Vivier
Quoted 13 lines · Cornelia Huck
Standardize header guards to _LIB_HEADER_H_.
Signed-off-by Cornelia Huck <[email protected]>--- lib/alloc_page.h | 4 ++-- lib/libcflat.h | 4 ++-- lib/list.h | 4 ++-- lib/pci-edu.h | 4 ++-- lib/pci-host-generic.h | 4 ++-- lib/setjmp.h | 4 ++-- lib/string.h | 6 +++--- lib/vmalloc.h | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-)
Quoted 1 line
What about
lib/argv.handlib/pci.h?
argv.h does not have a header guard yet (it probably should?)
I forgot to commit my changes to pci.h, I think :(
Quoted 3 lines
And there is also this instance of
CONFIG_Hinlib/config.hgenerated by configure.
Yeah, we should tweak the generator for that.
Re: [kvm-unit-tests PATCH v2 2/7] lib: unify header guards
Quoted 17 lines · Cornelia Huck
Quoted 15 lines · Laurent Vivier
Quoted 13 lines · Cornelia Huck
Standardize header guards to _LIB_HEADER_H_.
Signed-off-by Cornelia Huck <[email protected]>--- lib/alloc_page.h | 4 ++-- lib/libcflat.h | 4 ++-- lib/list.h | 4 ++-- lib/pci-edu.h | 4 ++-- lib/pci-host-generic.h | 4 ++-- lib/setjmp.h | 4 ++-- lib/string.h | 6 +++--- lib/vmalloc.h | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-)
Quoted 3 lines
Quoted 1 line
What about
lib/argv.handlib/pci.h?
argv.hdoes not have a header guard yet (it probably should?)
I think if we want to standardize header guards we should add them where they are not.
But no real strong opinion on that...
Thanks,
Laurent
PATCH v2 3/7 asm-generic: unify header guards
In reply to Cornelia HuckStandardize header guards to _ASM_GENERIC_HEADER_H_.
--- lib/asm-generic/atomic.h | 4 ++-- lib/asm-generic/barrier.h | 6 +++--- lib/asm-generic/memory_areas.h | 4 ++-- lib/asm-generic/pci-host-bridge.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-)
lib/asm-generic/atomic.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __ASM_GENERIC_ATOMIC_H__ -#define __ASM_GENERIC_ATOMIC_H__ +#ifndef _ASM_GENERIC_ATOMIC_H_ +#define _ASM_GENERIC_ATOMIC_H_/* From QEMU include/qemu/atomic.h */ #define atomic_fetch_inc (ptr) __sync_fetch_and_add(ptr, 1)
lib/asm-generic/barrier.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _ASM_BARRIER_H_ -#define _ASM_BARRIER_H_ +#ifndef _ASM_GENERIC_BARRIER_H_ +#define _ASM_GENERIC_BARRIER_H_/* * asm-generic/barrier.h *
@@ -32,4 +32,4 @@#define cpu_relax () asm volatile ("":::"memory")#endif -#endif /* _ASM_BARRIER_H_ */ +#endif /* _ASM_GENERIC_BARRIER_H_ */
lib/asm-generic/memory_areas.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __ASM_GENERIC_MEMORY_AREAS_H__ -#define __ASM_GENERIC_MEMORY_AREAS_H__ +#ifndef _ASM_GENERIC_MEMORY_AREAS_H_ +#define _ASM_GENERIC_MEMORY_AREAS_H_#define AREA_NORMAL_PFN 0#define AREA_NORMAL_NUMBER 0
lib/asm-generic/pci-host-bridge.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef _ASM_PCI_HOST_BRIDGE_H_ -#define _ASM_PCI_HOST_BRIDGE_H_ +#ifndef _ASM_GENERIC_PCI_HOST_BRIDGE_H_ +#define _ASM_GENERIC_PCI_HOST_BRIDGE_H_/* * Copyright (C) 2016, Red Hat Inc, Alexander Gordeev <[email protected]> *
Signature · 1 line
2.31.1
Re: [kvm-unit-tests PATCH v2 3/7] asm-generic: unify header guards
Quoted 58 lines · Cornelia Huck
Standardize header guards to _ASM_GENERIC_HEADER_H_.
Signed-off-by Cornelia Huck <[email protected]>--- lib/asm-generic/atomic.h | 4 ++-- lib/asm-generic/barrier.h | 6 +++--- lib/asm-generic/memory_areas.h | 4 ++-- lib/asm-generic/pci-host-bridge.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-)lib/asm-generic/atomic.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __ASM_GENERIC_ATOMIC_H__ -#define __ASM_GENERIC_ATOMIC_H__ +#ifndef _ASM_GENERIC_ATOMIC_H_ +#define _ASM_GENERIC_ATOMIC_H_/* From QEMU include/qemu/atomic.h */ #define atomic_fetch_inc (ptr) __sync_fetch_and_add(ptr, 1)lib/asm-generic/barrier.h +3
-3@@ -1,5 +1,5 @@ -#ifndef _ASM_BARRIER_H_ -#define _ASM_BARRIER_H_ +#ifndef _ASM_GENERIC_BARRIER_H_ +#define _ASM_GENERIC_BARRIER_H_/* * asm-generic/barrier.h * @@ -32,4 +32,4 @@#define cpu_relax () asm volatile ("":::"memory")#endif -#endif /* _ASM_BARRIER_H_ */ +#endif /* _ASM_GENERIC_BARRIER_H_ */ lib/asm-generic/memory_areas.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __ASM_GENERIC_MEMORY_AREAS_H__ -#define __ASM_GENERIC_MEMORY_AREAS_H__ +#ifndef _ASM_GENERIC_MEMORY_AREAS_H_ +#define _ASM_GENERIC_MEMORY_AREAS_H_#define AREA_NORMAL_PFN 0#define AREA_NORMAL_NUMBER 0lib/asm-generic/pci-host-bridge.h +0
-0
lib/asm-generic/pci-host-bridge.h line 5
Quoted 7 lines
lib/asm-generic/pci-host-bridge.h +2
-2@@ -1,5 +1,5 @@ -#ifndef _ASM_PCI_HOST_BRIDGE_H_ -#define _ASM_PCI_HOST_BRIDGE_H_ +#ifndef _ASM_GENERIC_PCI_HOST_BRIDGE_H_ +#define _ASM_GENERIC_PCI_HOST_BRIDGE_H_/* * Copyright (C) 2016, Red Hat Inc, Alexander Gordeev <[email protected]> *
Signature · 3 lines
Thanks, David / dhildenb
Re: [kvm-unit-tests PATCH v2 3/7] asm-generic: unify header guards
In reply to Cornelia HuckQuoted 58 lines · Cornelia Huck
Standardize header guards to _ASM_GENERIC_HEADER_H_.
Signed-off-by Cornelia Huck <[email protected]>--- lib/asm-generic/atomic.h | 4 ++-- lib/asm-generic/barrier.h | 6 +++--- lib/asm-generic/memory_areas.h | 4 ++-- lib/asm-generic/pci-host-bridge.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-)lib/asm-generic/atomic.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __ASM_GENERIC_ATOMIC_H__ -#define __ASM_GENERIC_ATOMIC_H__ +#ifndef _ASM_GENERIC_ATOMIC_H_ +#define _ASM_GENERIC_ATOMIC_H_/* From QEMU include/qemu/atomic.h */ #define atomic_fetch_inc (ptr) __sync_fetch_and_add(ptr, 1)lib/asm-generic/barrier.h +3
-3@@ -1,5 +1,5 @@ -#ifndef _ASM_BARRIER_H_ -#define _ASM_BARRIER_H_ +#ifndef _ASM_GENERIC_BARRIER_H_ +#define _ASM_GENERIC_BARRIER_H_/* * asm-generic/barrier.h * @@ -32,4 +32,4 @@#define cpu_relax () asm volatile ("":::"memory")#endif -#endif /* _ASM_BARRIER_H_ */ +#endif /* _ASM_GENERIC_BARRIER_H_ */ lib/asm-generic/memory_areas.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __ASM_GENERIC_MEMORY_AREAS_H__ -#define __ASM_GENERIC_MEMORY_AREAS_H__ +#ifndef _ASM_GENERIC_MEMORY_AREAS_H_ +#define _ASM_GENERIC_MEMORY_AREAS_H_#define AREA_NORMAL_PFN 0#define AREA_NORMAL_NUMBER 0lib/asm-generic/pci-host-bridge.h +0
-0
lib/asm-generic/pci-host-bridge.h line 5
Quoted 7 lines
lib/asm-generic/pci-host-bridge.h +2
-2@@ -1,5 +1,5 @@ -#ifndef _ASM_PCI_HOST_BRIDGE_H_ -#define _ASM_PCI_HOST_BRIDGE_H_ +#ifndef _ASM_GENERIC_PCI_HOST_BRIDGE_H_ +#define _ASM_GENERIC_PCI_HOST_BRIDGE_H_/* * Copyright (C) 2016, Red Hat Inc, Alexander Gordeev <[email protected]> *
PATCH v2 4/7 arm: unify header guards
In reply to Cornelia HuckThe assembler.h files were the only ones not already following the convention.
--- lib/arm/asm/assembler.h | 6 +++--- lib/arm64/asm/assembler.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
lib/arm/asm/assembler.h +3 -3
@@ -8,8 +8,8 @@#error "Only include this from assembly code"#endif -#ifndef __ASM_ASSEMBLER_H -#define __ASM_ASSEMBLER_H +#ifndef _ASMARM_ASSEMBLER_H_ +#define _ASMARM_ASSEMBLER_H_/* * dcache_line_size - get the minimum D-cache line size from the CTR register
@@ -50,4 +50,4 @@ dsb \domain .endm -#endif /* __ASM_ASSEMBLER_H */ +#endif /* _ASMARM_ASSEMBLER_H_ */
lib/arm64/asm/assembler.h +3 -3
@@ -12,8 +12,8 @@#error "Only include this from assembly code"#endif -#ifndef __ASM_ASSEMBLER_H -#define __ASM_ASSEMBLER_H +#ifndef _ASMARM64_ASSEMBLER_H_ +#define _ASMARM64_ASSEMBLER_H_/* * raw_dcache_line_size - get the minimum D-cache line size on this CPU
@@ -51,4 +51,4 @@ dsb \domain .endm -#endif /* __ASM_ASSEMBLER_H */ +#endif /* _ASMARM64_ASSEMBLER_H_ */
Signature · 1 line
2.31.1
Re: [kvm-unit-tests PATCH v2 4/7] arm: unify header guards
Quoted 47 lines · Cornelia Huck
The
assembler.hfiles were the only ones not already following the convention.Signed-off-by Cornelia Huck <[email protected]>--- lib/arm/asm/assembler.h | 6 +++--- lib/arm64/asm/assembler.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)lib/arm/asm/assembler.h +3
-3@@ -8,8 +8,8 @@#error "Only include this from assembly code"#endif -#ifndef __ASM_ASSEMBLER_H -#define __ASM_ASSEMBLER_H +#ifndef _ASMARM_ASSEMBLER_H_ +#define _ASMARM_ASSEMBLER_H_/* * dcache_line_size - get the minimum D-cache line size from the CTR register @@ -50,4 +50,4 @@ dsb \domain .endm -#endif /* __ASM_ASSEMBLER_H */ +#endif /* _ASMARM_ASSEMBLER_H_ */ lib/arm64/asm/assembler.h +2
-2@@ -12,8 +12,8 @@#error "Only include this from assembly code"#endif -#ifndef __ASM_ASSEMBLER_H -#define __ASM_ASSEMBLER_H +#ifndef _ASMARM64_ASSEMBLER_H_ +#define _ASMARM64_ASSEMBLER_H_/* * raw_dcache_line_size - get the minimum D-cache line size on this CPU
lib/arm64/asm/assembler.h line 54
Quoted 5 lines
lib/arm64/asm/assembler.h +1
-1@@ -51,4 +51,4 @@ dsb \domain .endm -#endif /* __ASM_ASSEMBLER_H */ +#endif /* _ASMARM64_ASSEMBLER_H_ */
Signature · 3 lines
Thanks, David / dhildenb
Re: [kvm-unit-tests PATCH v2 4/7] arm: unify header guards
In reply to Cornelia HuckQuoted 8 lines · Cornelia Huck
The
assembler.hfiles were the only ones not already following the convention.Signed-off-by Cornelia Huck <[email protected]>--- lib/arm/asm/assembler.h | 6 +++--- lib/arm64/asm/assembler.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
What about lib/arm/io.h?
I think you can remove the guard from
lib/arm/asm/memory_areas.h
as the other files including directly a header doesn't guard it.
Missing lib/arm/asm/mmu-api.h, lib/arm/asm/mmu.h, lib/arm64/asm/mmu.h
Thanks,
Laurent
Quoted 44 lines
lib/arm/asm/assembler.h +3
-3@@ -8,8 +8,8 @@#error "Only include this from assembly code"#endif -#ifndef __ASM_ASSEMBLER_H -#define __ASM_ASSEMBLER_H +#ifndef _ASMARM_ASSEMBLER_H_ +#define _ASMARM_ASSEMBLER_H_/* * dcache_line_size - get the minimum D-cache line size from the CTR register @@ -50,4 +50,4 @@ dsb \domain .endm -#endif /* __ASM_ASSEMBLER_H */ +#endif /* _ASMARM_ASSEMBLER_H_ */ lib/arm64/asm/assembler.h +3
-3@@ -12,8 +12,8 @@#error "Only include this from assembly code"#endif -#ifndef __ASM_ASSEMBLER_H -#define __ASM_ASSEMBLER_H +#ifndef _ASMARM64_ASSEMBLER_H_ +#define _ASMARM64_ASSEMBLER_H_/* * raw_dcache_line_size - get the minimum D-cache line size on this CPU @@ -51,4 +51,4 @@ dsb \domain .endm -#endif /* __ASM_ASSEMBLER_H */ +#endif /* _ASMARM64_ASSEMBLER_H_ */
Re: [kvm-unit-tests PATCH v2 4/7] arm: unify header guards
Quoted 11 lines · Laurent Vivier
Quoted 8 lines · Cornelia Huck
The
assembler.hfiles were the only ones not already following the convention.Signed-off-by Cornelia Huck <[email protected]>--- lib/arm/asm/assembler.h | 6 +++--- lib/arm64/asm/assembler.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)What about
lib/arm/io.h?
It didn't have a guard yet, so I didn't touch it.
Quoted 6 lines
I think you can remove the guard from
lib/arm/asm/memory_areas.has the other files including directly a header doesn't guard it.
I see other architectures doing that, though. I guess it doesn't hurt, but we can certainly also remove it. Other opinions?
Quoted 2 lines
Missing
lib/arm/asm/mmu-api.h,lib/arm/asm/mmu.h,lib/arm64/asm/mmu.h
Oops, overlooked the extra underscore there.
Re: [kvm-unit-tests PATCH v2 4/7] arm: unify header guards
Quoted 17 lines · Cornelia Huck
Quoted 11 lines · Laurent Vivier
Quoted 8 lines · Cornelia Huck
The
assembler.hfiles were the only ones not already following the convention.Signed-off-by Cornelia Huck <[email protected]>--- lib/arm/asm/assembler.h | 6 +++--- lib/arm64/asm/assembler.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)What about
lib/arm/io.h?It didn't have a guard yet, so I didn't touch it.
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
I think you can remove the guard from
lib/arm/asm/memory_areas.has the other files including directly a header doesn't guard it.
I see other architectures doing that, though. I guess it doesn't hurt, but we can certainly also remove it. Other opinions?
It doesn't hurt to remove it but I think what is important is to have the same rule everywhere.
Thanks,
Laurent
PATCH v2 5/7 powerpc: unify header guards
In reply to Cornelia HuckOnly spapr.h needed a tweak.
--- powerpc/spapr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
powerpc/spapr.h +3 -3
@@ -1,6 +1,6 @@ -#ifndef _ASMPOWERPC_SPAPR_H_ -#define _ASMPOWERPC_SPAPR_H_ +#ifndef POWERPC_SPAPR_H +#define POWERPC_SPAPR_H #define SPAPR_KERNEL_LOAD_ADDR 0x400000 -#endif /* _ASMPOWERPC_SPAPR_H_ */ +#endif /* POWERPC_SPAPR_H */
Signature · 1 line
2.31.1
Re: [kvm-unit-tests PATCH v2 5/7] powerpc: unify header guards
Quoted 13 lines · Cornelia Huck
Only
spapr.hneeded a tweak.Signed-off-by Cornelia Huck <[email protected]>--- powerpc/spapr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)powerpc/spapr.h +0
-0
powerpc/spapr.h line 6
Quoted 9 lines
powerpc/spapr.h +3
-3@@ -1,6 +1,6 @@ -#ifndef _ASMPOWERPC_SPAPR_H_ -#define _ASMPOWERPC_SPAPR_H_ +#ifndef POWERPC_SPAPR_H +#define POWERPC_SPAPR_H #define SPAPR_KERNEL_LOAD_ADDR 0x400000 -#endif /* _ASMPOWERPC_SPAPR_H_ */ +#endif /* POWERPC_SPAPR_H */
Signature · 3 lines
Thanks, David / dhildenb
Re: [kvm-unit-tests PATCH v2 5/7] powerpc: unify header guards
In reply to Cornelia HuckQuoted 13 lines · Cornelia Huck
Only
spapr.hneeded a tweak.Signed-off-by Cornelia Huck <[email protected]>--- powerpc/spapr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)powerpc/spapr.h +0
-0
powerpc/spapr.h line 6
Quoted 9 lines
powerpc/spapr.h +3
-3@@ -1,6 +1,6 @@ -#ifndef _ASMPOWERPC_SPAPR_H_ -#define _ASMPOWERPC_SPAPR_H_ +#ifndef POWERPC_SPAPR_H +#define POWERPC_SPAPR_H #define SPAPR_KERNEL_LOAD_ADDR 0x400000 -#endif /* _ASMPOWERPC_SPAPR_H_ */ +#endif /* POWERPC_SPAPR_H */
PATCH v2 6/7 s390x: unify header guards
In reply to Cornelia HuckStandardize header guards to _ASMS390X_HEADER_H_, _S390X_HEADER_H_, and S390X_HEADER_H, respectively.
--- lib/s390x/asm/arch_def.h | 4 ++-- lib/s390x/asm/barrier.h | 4 ++-- lib/s390x/asm/cpacf.h | 6 +++--- lib/s390x/asm/facility.h | 4 ++-- lib/s390x/asm/float.h | 4 ++-- lib/s390x/asm/mem.h | 4 ++-- lib/s390x/asm/sigp.h | 6 +++--- lib/s390x/asm/spinlock.h | 4 ++-- lib/s390x/asm/time.h | 4 ++-- lib/s390x/asm/uv.h | 4 ++-- lib/s390x/css.h | 4 ++-- lib/s390x/interrupt.h | 4 ++-- lib/s390x/mmu.h | 4 ++-- lib/s390x/sclp.h | 6 +++--- lib/s390x/sie.h | 6 +++--- lib/s390x/smp.h | 4 ++-- lib/s390x/uv.h | 4 ++-- lib/s390x/vm.h | 6 +++--- s390x/sthyi.h | 4 ++-- 19 files changed, 43 insertions(+), 43 deletions(-)
lib/s390x/asm/arch_def.h +2 -2
@@ -5,8 +5,8 @@* Authors: * David Hildenbrand <[email protected]> */ -#ifndef _ASM_S390X_ARCH_DEF_H_ -#define _ASM_S390X_ARCH_DEF_H_ +#ifndef _ASMS390X_ARCH_DEF_H_ +#define _ASMS390X_ARCH_DEF_H_ struct stack_frame { struct stack_frame *back_chain;
lib/s390x/asm/barrier.h +2 -2
@@ -6,8 +6,8 @@* Thomas Huth <[email protected]> * David Hildenbrand <[email protected]> */ -#ifndef _ASM_S390X_BARRIER_H_ -#define _ASM_S390X_BARRIER_H_ +#ifndef _ASMS390X_BARRIER_H_ +#define _ASMS390X_BARRIER_H_#include <asm-generic/barrier.h>
lib/s390x/asm/cpacf.h +3 -3
@@ -8,8 +8,8 @@* Harald Freudenberger ([email protected]) * Martin Schwidefsky <[email protected]> */ -#ifndef _ASM_S390_CPACF_H -#define _ASM_S390_CPACF_H +#ifndef _ASMS390X_CPACF_H_ +#define _ASMS390X_CPACF_H_#include <asm/facility.h> #include <linux/compiler.h>
@@ -471,4 +471,4 @@ static inline void cpacf_pckmo(long func, void *param) : "cc", "memory"); } -#endif /* _ASM_S390_CPACF_H */ +#endif /* _ASMS390X_CPACF_H_ */
lib/s390x/asm/facility.h +2 -2
@@ -5,8 +5,8 @@* Authors: * David Hildenbrand <[email protected]> */ -#ifndef _ASM_S390X_FACILITY_H_ -#define _ASM_S390X_FACILITY_H_ +#ifndef _ASMS390X_FACILITY_H_ +#define _ASMS390X_FACILITY_H_#include <libcflat.h> #include <asm/facility.h>
lib/s390x/asm/float.h +2 -2
@@ -5,8 +5,8 @@* Authors: * David Hildenbrand <[email protected]> */ -#ifndef _ASM_S390X_FLOAT_H_ -#define _ASM_S390X_FLOAT_H_ +#ifndef _ASMS390X_FLOAT_H_ +#define _ASMS390X_FLOAT_H_static inline void set_fpc (uint32_t fpc) {
lib/s390x/asm/mem.h +2 -2
@@ -5,8 +5,8 @@* Copyright IBM Corp. 2018 * Author(s): Janosch Frank <[email protected]> */ -#ifndef _ASM_S390_MEM_H -#define _ASM_S390_MEM_H +#ifndef _ASMS390X_MEM_H_ +#define _ASMS390X_MEM_H_#define SKEY_ACC 0xf0#define SKEY_FP 0x08
lib/s390x/asm/sigp.h +3 -3
@@ -5,8 +5,8 @@* Copied from the Linux kernel file arch/s390/include/asm/sigp.h */ -#ifndef ASM_S390X_SIGP_H -#define ASM_S390X_SIGP_H +#ifndef _ASMS390X_SIGP_H_ +#define _ASMS390X_SIGP_H_/* SIGP order codes */ #define SIGP_SENSE 1
@@ -73,4 +73,4 @@ static inline int sigp_retry(uint16_t addr, uint8_t order, unsigned long parm, }#endif /* __ASSEMBLER__ */ -#endif /* ASM_S390X_SIGP_H */ +#endif /* _ASMS390X_SIGP_H_ */
lib/s390x/asm/spinlock.h +2 -2
@@ -6,8 +6,8 @@* Thomas Huth <[email protected]> * David Hildenbrand <[email protected]> */ -#ifndef __ASMS390X_SPINLOCK_H -#define __ASMS390X_SPINLOCK_H +#ifndef _ASMS390X_SPINLOCK_H_ +#define _ASMS390X_SPINLOCK_H_#include <asm-generic/spinlock.h>
lib/s390x/asm/time.h +2 -2
@@ -8,8 +8,8 @@* Copied from the s390/intercept test by: * Pierre Morel <[email protected]> */ -#ifndef ASM_S390X_TIME_H -#define ASM_S390X_TIME_H +#ifndef _ASMS390X_TIME_H_ +#define _ASMS390X_TIME_H_#define STCK_SHIFT_US (63 - 51)#define STCK_MAX ((1UL << 52) - 1)
lib/s390x/asm/uv.h +2 -2
@@ -9,8 +9,8 @@* This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2. */ -#ifndef ASM_S390X_UV_H -#define ASM_S390X_UV_H +#ifndef _ASMS390X_UV_H_ +#define _ASMS390X_UV_H_#define UVC_RC_EXECUTED 0x0001#define UVC_RC_INV_CMD 0x0002
lib/s390x/css.h +2 -2
@@ -6,8 +6,8 @@* Author: Pierre Morel <[email protected]> */ -#ifndef CSS_H -#define CSS_H +#ifndef _S390X_CSS_H_ +#define _S390X_CSS_H_#define lowcore_ptr ((struct lowcore *)0x0)
lib/s390x/interrupt.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef INTERRUPT_H -#define INTERRUPT_H +#ifndef _S390X_INTERRUPT_H_ +#define _S390X_INTERRUPT_H_#include <asm/interrupt.h> int register_io_int_func (void (*f)(void ));
lib/s390x/mmu.h +2 -2
@@ -7,8 +7,8 @@* Authors: * Janosch Frank <[email protected]> */ -#ifndef _ASMS390X_MMU_H_ -#define _ASMS390X_MMU_H_ +#ifndef _S390X_MMU_H_ +#define _S390X_MMU_H_void protect_page (void *vaddr,unsigned long prot);void protect_range (void *start,unsigned long len,unsigned long prot);
lib/s390x/sclp.h +3 -3
@@ -10,8 +10,8 @@* Author: Christian Borntraeger <[email protected]> */ -#ifndef SCLP_H -#define SCLP_H +#ifndef _S390X_SCLP_H_ +#define _S390X_SCLP_H_#define SCLP_CMD_CODE_MASK 0xffff00ff
@@ -329,4 +329,4 @@ void sclp_memory_setup(void);uint64_t get_ram_size (void );uint64_t get_max_ram_size (void ); -#endif /* SCLP_H */ +#endif /* _S390X_SCLP_H_ */
lib/s390x/sie.h +3 -3
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef SIE_H -#define SIE_H +#ifndef _S390X_SIE_H_ +#define _S390X_SIE_H_#define CPUSTAT_STOPPED 0x80000000#define CPUSTAT_WAIT 0x10000000
@@ -195,4 +195,4 @@ extern void sie_entry(void);extern void sie_exit (void );extern void sie64a (struct kvm_s390_sie_block *sblk,struct vm_save_area *save_area); -#endif /* SIE_H */ +#endif /* _S390X_SIE_H_ */
lib/s390x/smp.h +2 -2
@@ -7,8 +7,8 @@* Authors: * Janosch Frank <[email protected]> */ -#ifndef SMP_H -#define SMP_H +#ifndef _S390X_SMP_H_ +#define _S390X_SMP_H_#include <asm/arch_def.h>
lib/s390x/uv.h +2 -2
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef UV_H -#define UV_H +#ifndef _S390X_UV_H_ +#define _S390X_UV_H_bool uv_os_is_guest (void );bool uv_os_is_host (void );
lib/s390x/vm.h +3 -3
@@ -5,9 +5,9 @@* Copyright (c) 2020 Red Hat Inc */ -#ifndef S390X_VM_H -#define S390X_VM_H +#ifndef _S390X_VM_H_ +#define _S390X_VM_H_bool vm_is_tcg (void ); -#endif /* S390X_VM_H */ +#endif /* _S390X_VM_H_ */
s390x/sthyi.h +2 -2
@@ -7,8 +7,8 @@* Authors: * Janosch Frank <[email protected]> */ -#ifndef _STHYI_H_ -#define _STHYI_H_ +#ifndef S390X_STHYI_H +#define S390X_STHYI_H #include <stdint.h>
Signature · 1 line
2.31.1
Re: [kvm-unit-tests PATCH v2 6/7] s390x: unify header guards
Quoted 321 lines · Cornelia Huck
Standardize header guards to _ASMS390X_HEADER_H_, _S390X_HEADER_H_, and
S390X_HEADER_H, respectively.Signed-off-by Cornelia Huck <[email protected]>--- lib/s390x/asm/arch_def.h | 4 ++-- lib/s390x/asm/barrier.h | 4 ++-- lib/s390x/asm/cpacf.h | 6 +++--- lib/s390x/asm/facility.h | 4 ++-- lib/s390x/asm/float.h | 4 ++-- lib/s390x/asm/mem.h | 4 ++-- lib/s390x/asm/sigp.h | 6 +++--- lib/s390x/asm/spinlock.h | 4 ++-- lib/s390x/asm/time.h | 4 ++-- lib/s390x/asm/uv.h | 4 ++-- lib/s390x/css.h | 4 ++-- lib/s390x/interrupt.h | 4 ++-- lib/s390x/mmu.h | 4 ++-- lib/s390x/sclp.h | 6 +++--- lib/s390x/sie.h | 6 +++--- lib/s390x/smp.h | 4 ++-- lib/s390x/uv.h | 4 ++-- lib/s390x/vm.h | 6 +++--- s390x/sthyi.h | 4 ++-- 19 files changed, 43 insertions(+), 43 deletions(-)lib/s390x/asm/arch_def.h +2
-2@@ -5,8 +5,8 @@* Authors: * David Hildenbrand <[email protected]> */ -#ifndef _ASM_S390X_ARCH_DEF_H_ -#define _ASM_S390X_ARCH_DEF_H_ +#ifndef _ASMS390X_ARCH_DEF_H_ +#define _ASMS390X_ARCH_DEF_H_ struct stack_frame { struct stack_frame *back_chain;lib/s390x/asm/barrier.h +2
-2@@ -6,8 +6,8 @@* Thomas Huth <[email protected]> * David Hildenbrand <[email protected]> */ -#ifndef _ASM_S390X_BARRIER_H_ -#define _ASM_S390X_BARRIER_H_ +#ifndef _ASMS390X_BARRIER_H_ +#define _ASMS390X_BARRIER_H_#include <asm-generic/barrier.h> lib/s390x/asm/cpacf.h +3
-3@@ -8,8 +8,8 @@* Harald Freudenberger ([email protected]) * Martin Schwidefsky <[email protected]> */ -#ifndef _ASM_S390_CPACF_H -#define _ASM_S390_CPACF_H +#ifndef _ASMS390X_CPACF_H_ +#define _ASMS390X_CPACF_H_#include <asm/facility.h> #include <linux/compiler.h> @@ -471,4 +471,4 @@ static inline void cpacf_pckmo(long func, void *param) : "cc", "memory"); } -#endif /* _ASM_S390_CPACF_H */ +#endif /* _ASMS390X_CPACF_H_ */ lib/s390x/asm/facility.h +2
-2@@ -5,8 +5,8 @@* Authors: * David Hildenbrand <[email protected]> */ -#ifndef _ASM_S390X_FACILITY_H_ -#define _ASM_S390X_FACILITY_H_ +#ifndef _ASMS390X_FACILITY_H_ +#define _ASMS390X_FACILITY_H_#include <libcflat.h> #include <asm/facility.h> lib/s390x/asm/float.h +2
-2@@ -5,8 +5,8 @@* Authors: * David Hildenbrand <[email protected]> */ -#ifndef _ASM_S390X_FLOAT_H_ -#define _ASM_S390X_FLOAT_H_ +#ifndef _ASMS390X_FLOAT_H_ +#define _ASMS390X_FLOAT_H_static inline void set_fpc (uint32_t fpc) {lib/s390x/asm/mem.h +2
-2@@ -5,8 +5,8 @@* Copyright IBM Corp. 2018 * Author(s): Janosch Frank <[email protected]> */ -#ifndef _ASM_S390_MEM_H -#define _ASM_S390_MEM_H +#ifndef _ASMS390X_MEM_H_ +#define _ASMS390X_MEM_H_#define SKEY_ACC 0xf0#define SKEY_FP 0x08lib/s390x/asm/sigp.h +3
-3@@ -5,8 +5,8 @@* Copied from the Linux kernel file arch/s390/include/asm/sigp.h */ -#ifndef ASM_S390X_SIGP_H -#define ASM_S390X_SIGP_H +#ifndef _ASMS390X_SIGP_H_ +#define _ASMS390X_SIGP_H_/* SIGP order codes */ #define SIGP_SENSE 1@@ -73,4 +73,4 @@ static inline int sigp_retry(uint16_t addr, uint8_t order, unsigned long parm, }#endif /* __ASSEMBLER__ */ -#endif /* ASM_S390X_SIGP_H */ +#endif /* _ASMS390X_SIGP_H_ */ lib/s390x/asm/spinlock.h +2
-2@@ -6,8 +6,8 @@* Thomas Huth <[email protected]> * David Hildenbrand <[email protected]> */ -#ifndef __ASMS390X_SPINLOCK_H -#define __ASMS390X_SPINLOCK_H +#ifndef _ASMS390X_SPINLOCK_H_ +#define _ASMS390X_SPINLOCK_H_#include <asm-generic/spinlock.h> lib/s390x/asm/time.h +2
-2@@ -8,8 +8,8 @@* Copied from the s390/intercept test by: * Pierre Morel <[email protected]> */ -#ifndef ASM_S390X_TIME_H -#define ASM_S390X_TIME_H +#ifndef _ASMS390X_TIME_H_ +#define _ASMS390X_TIME_H_#define STCK_SHIFT_US (63 - 51)#define STCK_MAX ((1UL << 52) - 1)lib/s390x/asm/uv.h +2
-2@@ -9,8 +9,8 @@* This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2. */ -#ifndef ASM_S390X_UV_H -#define ASM_S390X_UV_H +#ifndef _ASMS390X_UV_H_ +#define _ASMS390X_UV_H_#define UVC_RC_EXECUTED 0x0001#define UVC_RC_INV_CMD 0x0002lib/s390x/css.h +2
-2@@ -6,8 +6,8 @@* Author: Pierre Morel <[email protected]> */ -#ifndef CSS_H -#define CSS_H +#ifndef _S390X_CSS_H_ +#define _S390X_CSS_H_#define lowcore_ptr ((struct lowcore *)0x0)lib/s390x/interrupt.h +2
-2@@ -1,5 +1,5 @@ -#ifndef INTERRUPT_H -#define INTERRUPT_H +#ifndef _S390X_INTERRUPT_H_ +#define _S390X_INTERRUPT_H_#include <asm/interrupt.h> int register_io_int_func (void (*f)(void ));lib/s390x/mmu.h +2
-2@@ -7,8 +7,8 @@* Authors: * Janosch Frank <[email protected]> */ -#ifndef _ASMS390X_MMU_H_ -#define _ASMS390X_MMU_H_ +#ifndef _S390X_MMU_H_ +#define _S390X_MMU_H_void protect_page (void *vaddr,unsigned long prot);void protect_range (void *start,unsigned long len,unsigned long prot);lib/s390x/sclp.h +3
-3@@ -10,8 +10,8 @@* Author: Christian Borntraeger <[email protected]> */ -#ifndef SCLP_H -#define SCLP_H +#ifndef _S390X_SCLP_H_ +#define _S390X_SCLP_H_#define SCLP_CMD_CODE_MASK 0xffff00ff@@ -329,4 +329,4 @@ void sclp_memory_setup(void);uint64_t get_ram_size (void );uint64_t get_max_ram_size (void ); -#endif /* SCLP_H */ +#endif /* _S390X_SCLP_H_ */ lib/s390x/sie.h +3
-3@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef SIE_H -#define SIE_H +#ifndef _S390X_SIE_H_ +#define _S390X_SIE_H_#define CPUSTAT_STOPPED 0x80000000#define CPUSTAT_WAIT 0x10000000@@ -195,4 +195,4 @@ extern void sie_entry(void);extern void sie_exit (void );extern void sie64a (struct kvm_s390_sie_block *sblk,struct vm_save_area *save_area); -#endif /* SIE_H */ +#endif /* _S390X_SIE_H_ */ lib/s390x/smp.h +2
-2@@ -7,8 +7,8 @@* Authors: * Janosch Frank <[email protected]> */ -#ifndef SMP_H -#define SMP_H +#ifndef _S390X_SMP_H_ +#define _S390X_SMP_H_#include <asm/arch_def.h> lib/s390x/uv.h +2
-2@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef UV_H -#define UV_H +#ifndef _S390X_UV_H_ +#define _S390X_UV_H_bool uv_os_is_guest (void );bool uv_os_is_host (void );lib/s390x/vm.h +3
-3@@ -5,9 +5,9 @@* Copyright (c) 2020 Red Hat Inc */ -#ifndef S390X_VM_H -#define S390X_VM_H +#ifndef _S390X_VM_H_ +#define _S390X_VM_H_bool vm_is_tcg (void ); -#endif /* S390X_VM_H */ +#endif /* _S390X_VM_H_ */ s390x/sthyi.h +0
-0
s390x/sthyi.h line 14
Quoted 10 lines
s390x/sthyi.h +2
-2@@ -7,8 +7,8 @@* Authors: * Janosch Frank <[email protected]> */ -#ifndef _STHYI_H_ -#define _STHYI_H_ +#ifndef S390X_STHYI_H +#define S390X_STHYI_H #include <stdint.h>
Signature · 3 lines
Thanks, David / dhildenb
PATCH v2 7/7 x86: unify header guards
In reply to Cornelia HuckStandardize header guards to _ASMX86_HEADER_H_, _X86_HEADER_H_, and X86_HEADER_H.
--- lib/x86/acpi.h | 4 ++-- lib/x86/apic-defs.h | 6 +++--- lib/x86/apic.h | 4 ++-- lib/x86/asm/barrier.h | 4 ++-- lib/x86/asm/debugreg.h | 6 +++--- lib/x86/asm/io.h | 4 ++-- lib/x86/asm/memory_areas.h | 4 ++-- lib/x86/asm/page.h | 4 ++-- lib/x86/asm/pci.h | 4 ++-- lib/x86/asm/spinlock.h | 4 ++-- lib/x86/asm/stack.h | 4 ++-- lib/x86/atomic.h | 4 ++-- lib/x86/delay.h | 4 ++-- lib/x86/desc.h | 4 ++-- lib/x86/fault_test.h | 4 ++-- lib/x86/fwcfg.h | 4 ++-- lib/x86/intel-iommu.h | 4 ++-- lib/x86/isr.h | 4 ++-- lib/x86/msr.h | 6 +++--- lib/x86/processor.h | 4 ++-- lib/x86/smp.h | 4 ++-- lib/x86/usermode.h | 4 ++-- lib/x86/vm.h | 4 ++-- x86/hyperv.h | 4 ++-- x86/ioram.h | 4 ++-- x86/kvmclock.h | 4 ++-- x86/svm.h | 4 ++-- x86/types.h | 4 ++-- x86/vmx.h | 4 ++-- 29 files changed, 61 insertions(+), 61 deletions(-)
lib/x86/acpi.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef KVM_ACPI_H -#define KVM_ACPI_H 1 +#ifndef _X86_ACPI_H_ +#define _X86_ACPI_H_#include "libcflat.h"
lib/x86/apic-defs.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_APICDEF_H -#define _ASM_X86_APICDEF_H +#ifndef _X86_APIC_DEFS_H_ +#define _X86_APIC_DEFS_H_/* * Abuse this header file to hold the number of max-cpus, making it available
@@ -144,4 +144,4 @@#define APIC_BASE_MSR 0x800 -#endif /* _ASM_X86_APICDEF_H */ +#endif /* _X86_APIC_DEFS_H_ */
lib/x86/apic.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef CFLAT_APIC_H -#define CFLAT_APIC_H +#ifndef _X86_APIC_H_ +#define _X86_APIC_H_#include <stdint.h> #include "apic-defs.h"
lib/x86/asm/barrier.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_BARRIER_H_ -#define _ASM_X86_BARRIER_H_ +#ifndef _ASMX86_BARRIER_H_ +#define _ASMX86_BARRIER_H_/* * Copyright (C) 2016, Red Hat Inc, Alexander Gordeev <[email protected]> *
lib/x86/asm/debugreg.h +3 -3
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _UAPI_ASM_X86_DEBUGREG_H -#define _UAPI_ASM_X86_DEBUGREG_H +#ifndef _ASMX86_DEBUGREG_H_ +#define _ASMX86_DEBUGREG_H_/* Indicate the register numbers for a number of the specific
@@ -78,4 +78,4 @@* HW breakpoint additions */ -#endif /* _UAPI_ASM_X86_DEBUGREG_H */ +#endif /* _ASMX86_DEBUGREG_H_ */
lib/x86/asm/io.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_IO_H_ -#define _ASM_X86_IO_H_ +#ifndef _ASMX86_IO_H_ +#define _ASMX86_IO_H_#define __iomem
lib/x86/asm/memory_areas.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_MEMORY_AREAS_H_ -#define _ASM_X86_MEMORY_AREAS_H_ +#ifndef _ASMX86_MEMORY_AREAS_H_ +#define _ASMX86_MEMORY_AREAS_H_#define AREA_NORMAL_PFN BIT(36-12)#define AREA_NORMAL_NUMBER 0
lib/x86/asm/page.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_PAGE_H_ -#define _ASM_X86_PAGE_H_ +#ifndef _ASMX86_PAGE_H_ +#define _ASMX86_PAGE_H_/* * Copyright (C) 2016, Red Hat Inc, Alexander Gordeev <[email protected]> *
lib/x86/asm/pci.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef ASM_PCI_H -#define ASM_PCI_H +#ifndef _ASMX86_PCI_H_ +#define _ASMX86_PCI_H_/* * Copyright (C) 2013, Red Hat Inc, Michael S. Tsirkin <[email protected]> *
lib/x86/asm/spinlock.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __ASM_SPINLOCK_H -#define __ASM_SPINLOCK_H +#ifndef _ASMX86_SPINLOCK_H_ +#define _ASMX86_SPINLOCK_H_#include <asm-generic/spinlock.h>
lib/x86/asm/stack.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef _X86ASM_STACK_H_ -#define _X86ASM_STACK_H_ +#ifndef _ASMX86_STACK_H_ +#define _ASMX86_STACK_H_#ifndef _STACK_H_#error Do not directly include <asm/stack.h>. Just use <stack.h>.
lib/x86/atomic.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __ATOMIC_H -#define __ATOMIC_H +#ifndef _X86_ATOMIC_H_ +#define _X86_ATOMIC_H_#include "asm-generic/atomic.h"
lib/x86/delay.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __X86_DELAY__ -#define __X86_DELAY__ +#ifndef _X86_DELAY_H_ +#define _X86_DELAY_H_#include "libcflat.h"
lib/x86/desc.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __IDT_TEST__ -#define __IDT_TEST__ +#ifndef _X86_DESC_H_ +#define _X86_DESC_H_#include <setjmp.h>
lib/x86/fault_test.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __FAULT_TEST__ -#define __FAULT_TEST__ +#ifndef _X86_FAULT_TEST_H_ +#define _X86_FAULT_TEST_H_#include "x86/msr.h" #include "x86/processor.h"
lib/x86/fwcfg.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef FWCFG_H -#define FWCFG_H +#ifndef _X86_FWCFG_H_ +#define _X86_FWCFG_H_#include <stdint.h> #include <stdbool.h>
lib/x86/intel-iommu.h +2 -2
@@ -12,8 +12,8 @@* (From include/linux/intel-iommu.h) */ -#ifndef __INTEL_IOMMU_H__ -#define __INTEL_IOMMU_H__ +#ifndef _X86_INTEL_IOMMU_H_ +#define _X86_INTEL_IOMMU_H_#include "libcflat.h" #include "isr.h"
lib/x86/isr.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __ISR_TEST__ -#define __ISR_TEST__ +#ifndef _X86_ISR_H_ +#define _X86_ISR_H_ typedef struct { ulong regs[sizeof(ulong)*2];
lib/x86/msr.h +3 -3
@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_MSR_INDEX_H -#define _ASM_X86_MSR_INDEX_H +#ifndef _X86_MSR_H_ +#define _X86_MSR_H_/* CPU model specific register (MSR) numbers */
@@ -435,4 +435,4 @@#define MSR_VM_IGNNE 0xc0010115#define MSR_VM_HSAVE_PA 0xc0010117 -#endif /* _ASM_X86_MSR_INDEX_H */ +#endif /* _X86_MSR_H_ */
lib/x86/processor.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef LIBCFLAT_PROCESSOR_H -#define LIBCFLAT_PROCESSOR_H +#ifndef _X86_PROCESSOR_H_ +#define _X86_PROCESSOR_H_#include "libcflat.h" #include "desc.h"
lib/x86/smp.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __SMP_H -#define __SMP_H +#ifndef _X86_SMP_H_ +#define _X86_SMP_H_#include <asm/spinlock.h> void smp_init (void );
lib/x86/usermode.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef _USERMODE_H_ -#define _USERMODE_H_ +#ifndef _X86_USERMODE_H_ +#define _X86_USERMODE_H_#include "x86/msr.h" #include "x86/processor.h"
lib/x86/vm.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef VM_H -#define VM_H +#ifndef _X86_VM_H_ +#define _X86_VM_H_#include "processor.h" #include "asm/page.h"
x86/hyperv.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __HYPERV_H -#define __HYPERV_H +#ifndef X86_HYPERV_H +#define X86_HYPERV_H #include "libcflat.h" #include "processor.h"
x86/ioram.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __IO_RAM_H -#define __IO_RAM_H +#ifndef X86_IORAM_H +#define X86_IORAM_H #define IORAM_BASE_PHYS 0xff000000UL#define IORAM_LEN 0x10000UL
x86/kvmclock.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef KVMCLOCK_H -#define KVMCLOCK_H +#ifndef X86_KVMCLOCK_H +#define X86_KVMCLOCK_H #define MSR_KVM_WALL_CLOCK_NEW 0x4b564d00#define MSR_KVM_SYSTEM_TIME_NEW 0x4b564d01
x86/svm.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __SVM_H -#define __SVM_H +#ifndef X86_SVM_H +#define X86_SVM_H #include "libcflat.h"
x86/types.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __TYPES_H -#define __TYPES_H +#ifndef X86_TYPES_H +#define X86_TYPES_H #define DE_VECTOR 0#define DB_VECTOR 1
x86/vmx.h +2 -2
@@ -1,5 +1,5 @@ -#ifndef __VMX_H -#define __VMX_H +#ifndef X86_VMX_H +#define X86_VMX_H #include "libcflat.h" #include "processor.h"
Signature · 1 line
2.31.1
Re: [kvm-unit-tests PATCH v2 7/7] x86: unify header guards
Quoted 400 lines · Cornelia Huck
Standardize header guards to _ASMX86_HEADER_H_, _X86_HEADER_H_, and
X86_HEADER_H.Signed-off-by Cornelia Huck <[email protected]>--- lib/x86/acpi.h | 4 ++-- lib/x86/apic-defs.h | 6 +++--- lib/x86/apic.h | 4 ++-- lib/x86/asm/barrier.h | 4 ++-- lib/x86/asm/debugreg.h | 6 +++--- lib/x86/asm/io.h | 4 ++-- lib/x86/asm/memory_areas.h | 4 ++-- lib/x86/asm/page.h | 4 ++-- lib/x86/asm/pci.h | 4 ++-- lib/x86/asm/spinlock.h | 4 ++-- lib/x86/asm/stack.h | 4 ++-- lib/x86/atomic.h | 4 ++-- lib/x86/delay.h | 4 ++-- lib/x86/desc.h | 4 ++-- lib/x86/fault_test.h | 4 ++-- lib/x86/fwcfg.h | 4 ++-- lib/x86/intel-iommu.h | 4 ++-- lib/x86/isr.h | 4 ++-- lib/x86/msr.h | 6 +++--- lib/x86/processor.h | 4 ++-- lib/x86/smp.h | 4 ++-- lib/x86/usermode.h | 4 ++-- lib/x86/vm.h | 4 ++-- x86/hyperv.h | 4 ++-- x86/ioram.h | 4 ++-- x86/kvmclock.h | 4 ++-- x86/svm.h | 4 ++-- x86/types.h | 4 ++-- x86/vmx.h | 4 ++-- 29 files changed, 61 insertions(+), 61 deletions(-)lib/x86/acpi.h +2
-2@@ -1,5 +1,5 @@ -#ifndef KVM_ACPI_H -#define KVM_ACPI_H 1 +#ifndef _X86_ACPI_H_ +#define _X86_ACPI_H_#include "libcflat.h" lib/x86/apic-defs.h +3
-3@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_APICDEF_H -#define _ASM_X86_APICDEF_H +#ifndef _X86_APIC_DEFS_H_ +#define _X86_APIC_DEFS_H_/* * Abuse this header file to hold the number of max-cpus, making it available @@ -144,4 +144,4 @@#define APIC_BASE_MSR 0x800 -#endif /* _ASM_X86_APICDEF_H */ +#endif /* _X86_APIC_DEFS_H_ */ lib/x86/apic.h +2
-2@@ -1,5 +1,5 @@ -#ifndef CFLAT_APIC_H -#define CFLAT_APIC_H +#ifndef _X86_APIC_H_ +#define _X86_APIC_H_#include <stdint.h> #include "apic-defs.h" lib/x86/asm/barrier.h +2
-2@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_BARRIER_H_ -#define _ASM_X86_BARRIER_H_ +#ifndef _ASMX86_BARRIER_H_ +#define _ASMX86_BARRIER_H_/* * Copyright (C) 2016, Red Hat Inc, Alexander Gordeev <[email protected]> * lib/x86/asm/debugreg.h +3
-3@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _UAPI_ASM_X86_DEBUGREG_H -#define _UAPI_ASM_X86_DEBUGREG_H +#ifndef _ASMX86_DEBUGREG_H_ +#define _ASMX86_DEBUGREG_H_/* Indicate the register numbers for a number of the specific @@ -78,4 +78,4 @@* HW breakpoint additions */ -#endif /* _UAPI_ASM_X86_DEBUGREG_H */ +#endif /* _ASMX86_DEBUGREG_H_ */ lib/x86/asm/io.h +2
-2@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_IO_H_ -#define _ASM_X86_IO_H_ +#ifndef _ASMX86_IO_H_ +#define _ASMX86_IO_H_#define __iomemlib/x86/asm/memory_areas.h +2
-2@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_MEMORY_AREAS_H_ -#define _ASM_X86_MEMORY_AREAS_H_ +#ifndef _ASMX86_MEMORY_AREAS_H_ +#define _ASMX86_MEMORY_AREAS_H_#define AREA_NORMAL_PFN BIT(36-12)#define AREA_NORMAL_NUMBER 0lib/x86/asm/page.h +2
-2@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_PAGE_H_ -#define _ASM_X86_PAGE_H_ +#ifndef _ASMX86_PAGE_H_ +#define _ASMX86_PAGE_H_/* * Copyright (C) 2016, Red Hat Inc, Alexander Gordeev <[email protected]> * lib/x86/asm/pci.h +2
-2@@ -1,5 +1,5 @@ -#ifndef ASM_PCI_H -#define ASM_PCI_H +#ifndef _ASMX86_PCI_H_ +#define _ASMX86_PCI_H_/* * Copyright (C) 2013, Red Hat Inc, Michael S. Tsirkin <[email protected]> * lib/x86/asm/spinlock.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __ASM_SPINLOCK_H -#define __ASM_SPINLOCK_H +#ifndef _ASMX86_SPINLOCK_H_ +#define _ASMX86_SPINLOCK_H_#include <asm-generic/spinlock.h> lib/x86/asm/stack.h +2
-2@@ -1,5 +1,5 @@ -#ifndef _X86ASM_STACK_H_ -#define _X86ASM_STACK_H_ +#ifndef _ASMX86_STACK_H_ +#define _ASMX86_STACK_H_#ifndef _STACK_H_#error Do not directly include <asm/stack.h>. Just use <stack.h>.lib/x86/atomic.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __ATOMIC_H -#define __ATOMIC_H +#ifndef _X86_ATOMIC_H_ +#define _X86_ATOMIC_H_#include "asm-generic/atomic.h" lib/x86/delay.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __X86_DELAY__ -#define __X86_DELAY__ +#ifndef _X86_DELAY_H_ +#define _X86_DELAY_H_#include "libcflat.h" lib/x86/desc.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __IDT_TEST__ -#define __IDT_TEST__ +#ifndef _X86_DESC_H_ +#define _X86_DESC_H_#include <setjmp.h> lib/x86/fault_test.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __FAULT_TEST__ -#define __FAULT_TEST__ +#ifndef _X86_FAULT_TEST_H_ +#define _X86_FAULT_TEST_H_#include "x86/msr.h" #include "x86/processor.h" lib/x86/fwcfg.h +2
-2@@ -1,5 +1,5 @@ -#ifndef FWCFG_H -#define FWCFG_H +#ifndef _X86_FWCFG_H_ +#define _X86_FWCFG_H_#include <stdint.h> #include <stdbool.h> lib/x86/intel-iommu.h +2
-2@@ -12,8 +12,8 @@* (From include/linux/intel-iommu.h) */ -#ifndef __INTEL_IOMMU_H__ -#define __INTEL_IOMMU_H__ +#ifndef _X86_INTEL_IOMMU_H_ +#define _X86_INTEL_IOMMU_H_#include "libcflat.h" #include "isr.h" lib/x86/isr.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __ISR_TEST__ -#define __ISR_TEST__ +#ifndef _X86_ISR_H_ +#define _X86_ISR_H_ typedef struct { ulong regs[sizeof(ulong)*2];lib/x86/msr.h +3
-3@@ -1,5 +1,5 @@ -#ifndef _ASM_X86_MSR_INDEX_H -#define _ASM_X86_MSR_INDEX_H +#ifndef _X86_MSR_H_ +#define _X86_MSR_H_/* CPU model specific register (MSR) numbers */ @@ -435,4 +435,4 @@#define MSR_VM_IGNNE 0xc0010115#define MSR_VM_HSAVE_PA 0xc0010117 -#endif /* _ASM_X86_MSR_INDEX_H */ +#endif /* _X86_MSR_H_ */ lib/x86/processor.h +2
-2@@ -1,5 +1,5 @@ -#ifndef LIBCFLAT_PROCESSOR_H -#define LIBCFLAT_PROCESSOR_H +#ifndef _X86_PROCESSOR_H_ +#define _X86_PROCESSOR_H_#include "libcflat.h" #include "desc.h" lib/x86/smp.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __SMP_H -#define __SMP_H +#ifndef _X86_SMP_H_ +#define _X86_SMP_H_#include <asm/spinlock.h> void smp_init (void );lib/x86/usermode.h +2
-2@@ -1,5 +1,5 @@ -#ifndef _USERMODE_H_ -#define _USERMODE_H_ +#ifndef _X86_USERMODE_H_ +#define _X86_USERMODE_H_#include "x86/msr.h" #include "x86/processor.h" lib/x86/vm.h +2
-2@@ -1,5 +1,5 @@ -#ifndef VM_H -#define VM_H +#ifndef _X86_VM_H_ +#define _X86_VM_H_#include "processor.h" #include "asm/page.h" x86/hyperv.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __HYPERV_H -#define __HYPERV_H +#ifndef X86_HYPERV_H +#define X86_HYPERV_H #include "libcflat.h" #include "processor.h" x86/ioram.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __IO_RAM_H -#define __IO_RAM_H +#ifndef X86_IORAM_H +#define X86_IORAM_H #define IORAM_BASE_PHYS 0xff000000UL#define IORAM_LEN 0x10000ULx86/kvmclock.h +2
-2@@ -1,5 +1,5 @@ -#ifndef KVMCLOCK_H -#define KVMCLOCK_H +#ifndef X86_KVMCLOCK_H +#define X86_KVMCLOCK_H #define MSR_KVM_WALL_CLOCK_NEW 0x4b564d00#define MSR_KVM_SYSTEM_TIME_NEW 0x4b564d01x86/svm.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __SVM_H -#define __SVM_H +#ifndef X86_SVM_H +#define X86_SVM_H #include "libcflat.h" x86/types.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __TYPES_H -#define __TYPES_H +#ifndef X86_TYPES_H +#define X86_TYPES_H #define DE_VECTOR 0#define DB_VECTOR 1x86/vmx.h +0
-0
x86/vmx.h line 5
Quoted 7 lines
x86/vmx.h +2
-2@@ -1,5 +1,5 @@ -#ifndef __VMX_H -#define __VMX_H +#ifndef X86_VMX_H +#define X86_VMX_H #include "libcflat.h" #include "processor.h"
Signature · 3 lines
Thanks, David / dhildenb
Quoted 9 lines · Cornelia Huck
This is an extension of "s390x: unify header guards" to the rest of kvm-unit-tests. I tried to choose a pattern that minimizes the changes; most of them are for s390x and x86.
v1->v2:
- change the patterns and document them
- change other architectures and architecture-independent code as well[...]
Applied, thanks!
[1/7] README.md: add guideline for header guards format
commit: 844669a9631d78a54b47f6667c9a2750b65d101c
[2/7] lib: unify header guards
commit: 9f0ae3012430ed7072d04247fb674125c616a6b4
[3/7] asm-generic: unify header guards
commit: 951e6299b30016bf04a343973296c4274e87f0e2
[4/7] arm: unify header guards
commit: 16f52ec9a4763e62e35453497e4f077031abcbfb
[5/7] powerpc: unify header guards
commit: 040ee6d9aee563b2b1f28e810c5e36fbbcc17bd9
[6/7] s390x: unify header guards
commit: eb5a1bbab00619256b76177e7a88cfe05834b026
[7/7] x86: unify header guards
commit: c865f654ffe4c5955038aaf74f702ba62f3eb014Best regards,
Signature · 1 line
Paolo Bonzini <[email protected]>
Quoted 14 lines · Paolo Bonzini
Quoted 9 lines · Cornelia Huck
This is an extension of "s390x: unify header guards" to the rest of kvm-unit-tests. I tried to choose a pattern that minimizes the changes; most of them are for s390x and x86.
v1->v2:
- change the patterns and document them
- change other architectures and architecture-independent code as well[...]
Applied, thanks!
[1/7] README.md: add guideline for header guards format
Quoted 13 lines
commit: 844669a9631d78a54b47f6667c9a2750b65d101c
[2/7] lib: unify header guards
commit: 9f0ae3012430ed7072d04247fb674125c616a6b4
[3/7] asm-generic: unify header guards
commit: 951e6299b30016bf04a343973296c4274e87f0e2
[4/7] arm: unify header guards
commit: 16f52ec9a4763e62e35453497e4f077031abcbfb
[5/7] powerpc: unify header guards
commit: 040ee6d9aee563b2b1f28e810c5e36fbbcc17bd9
[6/7] s390x: unify header guards
commit: eb5a1bbab00619256b76177e7a88cfe05834b026
[7/7] x86: unify header guards
commit: c865f654ffe4c5955038aaf74f702ba62f3eb014Oh, that was quick :)
I'll do some further (small) updates on top, then.