Commit 0018bc99 authored by Linus Torvalds's avatar Linus Torvalds Committed by Kleber Sacilotto de Souza

compiler, clang: properly override 'inline' for clang

BugLink: https://bugs.launchpad.net/bugs/1790884

commit 6d53cefb upstream.

Commit abb2ea7d ("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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 342d8662
...@@ -21,4 +21,5 @@ ...@@ -21,4 +21,5 @@
* -Wunused-function. This turns out to avoid the need for complex #ifdef * -Wunused-function. This turns out to avoid the need for complex #ifdef
* directives. Suppress the warning in clang as well. * directives. Suppress the warning in clang as well.
*/ */
#define inline inline __attribute__((unused)) #undef inline
#define inline inline __attribute__((unused)) notrace
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment