diff options
author | Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | 2018-09-03 13:17:50 -0400 |
---|---|---|
committer | Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | 2018-09-30 14:14:04 -0400 |
commit | e04462fb82f8dd98288c0e7ab1eec79c92537d25 (patch) | |
tree | 9b6d3a9c7e851242257fff603985ab9160138055 /include/linux/compiler.h | |
parent | 06e3727e02f9ee9cf571692cd5c74fc5a8a2af52 (diff) |
Compiler Attributes: remove uses of __attribute__ from compiler.h
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # on top of v4.19-rc5, clang 7
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r-- | include/linux/compiler.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 17ee9165ca51..b5fb034fa6fa 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -23,8 +23,8 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, | |||
23 | #define __branch_check__(x, expect, is_constant) ({ \ | 23 | #define __branch_check__(x, expect, is_constant) ({ \ |
24 | long ______r; \ | 24 | long ______r; \ |
25 | static struct ftrace_likely_data \ | 25 | static struct ftrace_likely_data \ |
26 | __attribute__((__aligned__(4))) \ | 26 | __aligned(4) \ |
27 | __attribute__((__section__("_ftrace_annotated_branch"))) \ | 27 | __section("_ftrace_annotated_branch") \ |
28 | ______f = { \ | 28 | ______f = { \ |
29 | .data.func = __func__, \ | 29 | .data.func = __func__, \ |
30 | .data.file = __FILE__, \ | 30 | .data.file = __FILE__, \ |
@@ -59,8 +59,8 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, | |||
59 | ({ \ | 59 | ({ \ |
60 | int ______r; \ | 60 | int ______r; \ |
61 | static struct ftrace_branch_data \ | 61 | static struct ftrace_branch_data \ |
62 | __attribute__((__aligned__(4))) \ | 62 | __aligned(4) \ |
63 | __attribute__((__section__("_ftrace_branch"))) \ | 63 | __section("_ftrace_branch") \ |
64 | ______f = { \ | 64 | ______f = { \ |
65 | .func = __func__, \ | 65 | .func = __func__, \ |
66 | .file = __FILE__, \ | 66 | .file = __FILE__, \ |
@@ -146,7 +146,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, | |||
146 | extern typeof(sym) sym; \ | 146 | extern typeof(sym) sym; \ |
147 | static const unsigned long __kentry_##sym \ | 147 | static const unsigned long __kentry_##sym \ |
148 | __used \ | 148 | __used \ |
149 | __attribute__((__section__("___kentry" "+" #sym ))) \ | 149 | __section("___kentry" "+" #sym ) \ |
150 | = (unsigned long)&sym; | 150 | = (unsigned long)&sym; |
151 | #endif | 151 | #endif |
152 | 152 | ||
@@ -287,7 +287,7 @@ unsigned long read_word_at_a_time(const void *addr) | |||
287 | * visible to the compiler. | 287 | * visible to the compiler. |
288 | */ | 288 | */ |
289 | #define __ADDRESSABLE(sym) \ | 289 | #define __ADDRESSABLE(sym) \ |
290 | static void * __attribute__((__section__(".discard.addressable"), used)) \ | 290 | static void * __section(".discard.addressable") __used \ |
291 | __PASTE(__addressable_##sym, __LINE__) = (void *)&sym; | 291 | __PASTE(__addressable_##sym, __LINE__) = (void *)&sym; |
292 | 292 | ||
293 | /** | 293 | /** |