diff options
author | Nick Desaulniers <ndesaulniers@google.com> | 2019-08-12 23:50:45 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2019-08-13 19:32:15 +0200 |
commit | 80d838122643a09a9f99824adea4b4261e4451e6 (patch) | |
tree | 26543584d8c5a700c1d366cefe309cd91cca6e6e /arch/arm64/include/asm/cache.h | |
parent | arm64/ptrace: Fix typoes in sve_set() comment (diff) | |
download | linux-80d838122643a09a9f99824adea4b4261e4451e6.tar.xz linux-80d838122643a09a9f99824adea4b4261e4451e6.zip |
arm64: prefer __section from compiler_attributes.h
GCC unescapes escaped string section names while Clang does not. Because
__section uses the `#` stringification operator for the section name, it
doesn't need to be escaped.
This antipattern was found with:
$ grep -e __section\(\" -e __section__\(\" -r
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/cache.h')
-rw-r--r-- | arch/arm64/include/asm/cache.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/cache.h b/arch/arm64/include/asm/cache.h index 64eeaa41e7ca..43da6dd29592 100644 --- a/arch/arm64/include/asm/cache.h +++ b/arch/arm64/include/asm/cache.h @@ -78,7 +78,7 @@ static inline u32 cache_type_cwg(void) return (read_cpuid_cachetype() >> CTR_CWG_SHIFT) & CTR_CWG_MASK; } -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(.data..read_mostly) static inline int cache_line_size_of_cpu(void) { |