From: Linus Torvalds Date: Sun, 11 Jun 2017 22:51:56 +0000 (-0700) Subject: compiler, clang: properly override 'inline' for clang X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f276b50c3a5b01c1b6636adb3e4eba67d187d218;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git compiler, clang: properly override 'inline' for clang commit 6d53cefb18e4646fb4bf62ccb6098fb3808486df upstream. Commit abb2ea7dfd82 ("compiler, clang: suppress warning for unused static inline functions") just caused more warnings due to re-defining the 'inline' macro. So undef it before re-defining it, and also add the 'notrace' attribute like the gcc version that this is overriding does. Maybe this makes clang happier. Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index 5ce62d3e69b5..8a97da12ea26 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h @@ -21,7 +21,8 @@ * -Wunused-function. This turns out to avoid the need for complex #ifdef * directives. Suppress the warning in clang as well. */ -#define inline inline __attribute__((unused)) +#undef inline +#define inline inline __attribute__((unused)) notrace /* Clang doesn't have a way to turn it off per-function, yet. */ #ifdef __noretpoline