Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+6 -6
+6 -6
include/linux/compiler.h
··· 23 23 #define __branch_check__(x, expect, is_constant) ({ \ 24 24 long ______r; \ 25 25 static struct ftrace_likely_data \ 26 - __attribute__((__aligned__(4))) \ 27 - __attribute__((__section__("_ftrace_annotated_branch"))) \ 26 + __aligned(4) \ 27 + __section("_ftrace_annotated_branch") \ 28 28 ______f = { \ 29 29 .data.func = __func__, \ 30 30 .data.file = __FILE__, \ ··· 59 59 ({ \ 60 60 int ______r; \ 61 61 static struct ftrace_branch_data \ 62 - __attribute__((__aligned__(4))) \ 63 - __attribute__((__section__("_ftrace_branch"))) \ 62 + __aligned(4) \ 63 + __section("_ftrace_branch") \ 64 64 ______f = { \ 65 65 .func = __func__, \ 66 66 .file = __FILE__, \ ··· 146 146 extern typeof(sym) sym; \ 147 147 static const unsigned long __kentry_##sym \ 148 148 __used \ 149 - __attribute__((__section__("___kentry" "+" #sym ))) \ 149 + __section("___kentry" "+" #sym ) \ 150 150 = (unsigned long)&sym; 151 151 #endif 152 152 ··· 287 287 * visible to the compiler. 288 288 */ 289 289 #define __ADDRESSABLE(sym) \ 290 - static void * __attribute__((__section__(".discard.addressable"), used)) \ 290 + static void * __section(".discard.addressable") __used \ 291 291 __PASTE(__addressable_##sym, __LINE__) = (void *)&sym; 292 292 293 293 /**