Skip to content

Commit 5e3c3a0

Browse files
Chen Limattst88
authored andcommitted
alpha: remove undef inline in compiler.h
since 889b3c1, 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 <[email protected]> Signed-off-by: Matt Turner <[email protected]>
1 parent a09c33c commit 5e3c3a0

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

arch/alpha/include/asm/compiler.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,4 @@
44

55
#include <uapi/asm/compiler.h>
66

7-
/* Some idiots over in <linux/compiler.h> thought inline should imply
8-
always_inline. This breaks stuff. We'll include this file whenever
9-
we run into such problems. */
10-
11-
#include <linux/compiler.h>
12-
#undef inline
13-
#undef __inline__
14-
#undef __inline
15-
#undef __always_inline
16-
#define __always_inline inline __attribute__((always_inline))
17-
187
#endif /* __ALPHA_COMPILER_H */

0 commit comments

Comments
 (0)