Message ID | 20210609143712.60933-5-cohuck@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | unify header guards | expand |
On 09.06.21 16:37, Cornelia Huck wrote: > The assembler.h files were the only ones not already following > the convention. > > Signed-off-by: Cornelia Huck <cohuck@redhat.com> > --- > lib/arm/asm/assembler.h | 6 +++--- > lib/arm64/asm/assembler.h | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/lib/arm/asm/assembler.h b/lib/arm/asm/assembler.h > index dfd3c51bf6ad..4200252dd14d 100644 > --- a/lib/arm/asm/assembler.h > +++ b/lib/arm/asm/assembler.h > @@ -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_ */ > diff --git a/lib/arm64/asm/assembler.h b/lib/arm64/asm/assembler.h > index 0a6ab9720bdd..a271e4ceefe6 100644 > --- a/lib/arm64/asm/assembler.h > +++ b/lib/arm64/asm/assembler.h > @@ -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_ */ > Reviewed-by: David Hildenbrand <david@redhat.com>
On 09/06/2021 16:37, Cornelia Huck wrote: > The assembler.h files were the only ones not already following > the convention. > > Signed-off-by: Cornelia Huck <cohuck@redhat.com> > --- > 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 > > diff --git a/lib/arm/asm/assembler.h b/lib/arm/asm/assembler.h > index dfd3c51bf6ad..4200252dd14d 100644 > --- a/lib/arm/asm/assembler.h > +++ b/lib/arm/asm/assembler.h > @@ -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_ */ > diff --git a/lib/arm64/asm/assembler.h b/lib/arm64/asm/assembler.h > index 0a6ab9720bdd..a271e4ceefe6 100644 > --- a/lib/arm64/asm/assembler.h > +++ b/lib/arm64/asm/assembler.h > @@ -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_ */ >
On Wed, Jun 09 2021, Laurent Vivier <lvivier@redhat.com> wrote: > On 09/06/2021 16:37, Cornelia Huck wrote: >> The assembler.h files were the only ones not already following >> the convention. >> >> Signed-off-by: Cornelia Huck <cohuck@redhat.com> >> --- >> 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. > > 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. I see other architectures doing that, though. I guess it doesn't hurt, but we can certainly also remove it. Other opinions? > > Missing lib/arm/asm/mmu-api.h, lib/arm/asm/mmu.h, lib/arm64/asm/mmu.h Oops, overlooked the extra underscore there.
On 09/06/2021 17:47, Cornelia Huck wrote: > On Wed, Jun 09 2021, Laurent Vivier <lvivier@redhat.com> wrote: > >> On 09/06/2021 16:37, Cornelia Huck wrote: >>> The assembler.h files were the only ones not already following >>> the convention. >>> >>> Signed-off-by: Cornelia Huck <cohuck@redhat.com> >>> --- >>> 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. > >> >> 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. > > 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
diff --git a/lib/arm/asm/assembler.h b/lib/arm/asm/assembler.h index dfd3c51bf6ad..4200252dd14d 100644 --- a/lib/arm/asm/assembler.h +++ b/lib/arm/asm/assembler.h @@ -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_ */ diff --git a/lib/arm64/asm/assembler.h b/lib/arm64/asm/assembler.h index 0a6ab9720bdd..a271e4ceefe6 100644 --- a/lib/arm64/asm/assembler.h +++ b/lib/arm64/asm/assembler.h @@ -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_ */
The assembler.h files were the only ones not already following the convention. Signed-off-by: Cornelia Huck <cohuck@redhat.com> --- lib/arm/asm/assembler.h | 6 +++--- lib/arm64/asm/assembler.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)