diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2021-05-20 13:23:52 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-05-24 14:21:30 -0400 |
commit | 236f2ec43266cb4dabd320381498df6c9d80c82d (patch) | |
tree | 3e49eddacb53d4ed87a3417d1b861b2be18402e2 /include/linux | |
parent | 9ce799aaba104a1f0d36bf84caec4c807fa31baa (diff) | |
download | u-boot-236f2ec43266cb4dabd320381498df6c9d80c82d.tar.gz u-boot-236f2ec43266cb4dabd320381498df6c9d80c82d.tar.bz2 u-boot-236f2ec43266cb4dabd320381498df6c9d80c82d.zip |
treewide: Convert macro and uses of __section(foo) to __section("foo")
This commit does the same thing as Linux commit 33def8498fdd.
Use a more generic form for __section that requires quotes to avoid
complications with clang and gcc differences.
Remove the quote operator # from compiler_attributes.h __section macro.
Convert all unquoted __section(foo) uses to quoted __section("foo").
Also convert __attribute__((section("foo"))) uses to __section("foo")
even if the __attribute__ has multiple list entry forms.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/compiler.h | 8 | ||||
-rw-r--r-- | include/linux/compiler_attributes.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 5e3b3c08e9..82a8a4ede9 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -24,7 +24,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, long ______r; \ static struct ftrace_likely_data \ __aligned(4) \ - __section(_ftrace_annotated_branch) \ + __section("_ftrace_annotated_branch") \ ______f = { \ .data.func = __func__, \ .data.file = __FILE__, \ @@ -60,7 +60,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, #define __trace_if_value(cond) ({ \ static struct ftrace_branch_data \ __aligned(4) \ - __section(_ftrace_branch) \ + __section("_ftrace_branch") \ __if_trace = { \ .func = __func__, \ .file = __FILE__, \ @@ -118,7 +118,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, ".popsection\n\t" /* Annotate a C jump table to allow objtool to follow the code flow */ -#define __annotate_jump_table __section(.rodata..c_jump_table) +#define __annotate_jump_table __section(".rodata..c_jump_table") #else #define annotate_reachable() @@ -294,7 +294,7 @@ unsigned long read_word_at_a_time(const void *addr) * visible to the compiler. */ #define __ADDRESSABLE(sym) \ - static void * __section(.discard.addressable) __used \ + static void * __section(".discard.addressable") __used \ __PASTE(__addressable_##sym, __LINE__) = (void *)&sym; /** diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h index cdf0165966..44c9a08d73 100644 --- a/include/linux/compiler_attributes.h +++ b/include/linux/compiler_attributes.h @@ -246,7 +246,7 @@ * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-section-variable-attribute * clang: https://clang.llvm.org/docs/AttributeReference.html#section-declspec-allocate */ -#define __section(S) __attribute__((__section__(#S))) +#define __section(S) __attribute__((__section__(S))) /* * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-unused-function-attribute |