]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
compiler, clang: properly override 'inline' for clang
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 11 Jun 2017 22:51:56 +0000 (15:51 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 11 Jun 2017 22:51:56 +0000 (15:51 -0700)
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 <torvalds@linux-foundation.org>
include/linux/compiler-clang.h

index ea9126006a69f94c7b8ea1705bf43bdf7b48e16c..d614c5ea1b5ea4a1772594b35525f1e64aec68ff 100644 (file)
@@ -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