Skip to content

Commit

Permalink
compiler, clang: properly override 'inline' for clang
Browse files Browse the repository at this point in the history
Commit abb2ea7 ("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]>
  • Loading branch information
torvalds committed Jun 11, 2017
1 parent 5ad9345 commit 6d53cef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/compiler-clang.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6d53cef

Please sign in to comment.