projects/linux·commit 6d53cefb

compiler, clang: properly override 'inline' for clang

6d53cefb · Linus Torvalds <[email protected]> · 2017-06-11 15:51:56 -07:00

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 <[email protected]>
Commit
6d53cefb18e4646fb4bf62ccb6098fb3808486df
Parents
5ad9345d

Changes

1 files changed · +2 −1

FileStatusAddDelContent
include/linux/compiler-clang.hmodified+2−1View file

include/linux/compiler-clang.h

View file
diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
index ea91260..d614c5e 100644
--- a/include/linux/compiler-clang.h
+++ b/include/linux/compiler-clang.h
@@ -21,4 +21,5 @@
* -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