Skip to content

Commit 6d53cef

Browse files
committed
compiler, clang: properly override 'inline' for clang
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]>
1 parent 5ad9345 commit 6d53cef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/linux/compiler-clang.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@
2121
* -Wunused-function. This turns out to avoid the need for complex #ifdef
2222
* directives. Suppress the warning in clang as well.
2323
*/
24-
#define inline inline __attribute__((unused))
24+
#undef inline
25+
#define inline inline __attribute__((unused)) notrace

0 commit comments

Comments
 (0)