]> git.baikalelectronics.ru Git - kernel.git/commit
alpha: remove undef inline in compiler.h
authorChen Li <chenli@uniontech.com>
Tue, 13 Oct 2020 06:31:52 +0000 (14:31 +0800)
committerMatt Turner <mattst88@gmail.com>
Mon, 26 Jul 2021 05:18:20 +0000 (22:18 -0700)
commit153165e6a58d942a6ebceae93f71be914899ed72
tree66e5a9ffb4ffe5c9f90a508fe86f5cc85472628c
parent312a0179ec60b2911771da21174ae5285d3af0bc
alpha: remove undef inline in compiler.h

since 6536fcc51499d81f759ca24fffdf40006f3df2fb, CONFIG_OPTIMIZE_INLINING
is removed entirely and inline is always defined to `inline __gnu_inline
__inline_maybe_unused notrace` in compiler_types.h

Besides, undef inline here also means it never use
__attribute__((__gnu_inline__)), so `extern inline` function can never
be defined header files, otherwise multiple definition errors will
happen, e.g. if multiple translation units use alpha/include/asm/pal.h
will report multiple definitions, because there are many extern inline
function definitions in this header.

``` c
extern inline TYPE NAME(void) \
{ \
register TYPE __r0 __asm__("$0"); \
__asm__ __volatile__( \
...
```

Ofc, it is also ok to remove `extern` in `extern inline` here, then all
of iso c99 and gnuc99/89 are ok, but there are also other alpha headers
have such function definitions.

Signed-off-by: chenli <chenli@uniontech.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
arch/alpha/include/asm/compiler.h