Skip to content

Commit 20e84a6

Browse files
Al Viroarndb
authored andcommitted
alpha: jensen, t2 - make __EXTERN_INLINE same as for the rest
We want io.h primitives (readb(), etc.) to be extern inline. However, that requires the backing out-of-line implementation somewhere, preferably kept in sync with the inline ones. The way it's done is __EXTERN_INLINE macro that defaults to extern inline, but can be overridden in compilation unit where the out-of-line instance will be. That works, but it's brittle - we *must* make sure that asm/io.h is the very first include in such compilation units. There'd been a bunch of bugs of that sort in the past. Another issue is the choice of overriding definition for __EXTERN_INLINE; it must be either 'inline' or empty. Either will do for compilation purposes - inline void foo(...) {...} (without extern or static) is going to generate out-of-line instance. The difference is that 'definition without a prototype' heuristics trigger on void foo(void) { ... } but not on inline void foo(void) { ... } Most of the overrides go for 'inline'; in two cases (sys_jensen and core_t2) __EXTERN_INLINE is defined as empty. Without -Wmissing-prototypes it didn't matter, but now that we have that thing always on... Signed-off-by: Al Viro <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Matt Turner <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent d92f145 commit 20e84a6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/alpha/kernel/core_t2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Code common to all T2 core logic chips.
1111
*/
1212

13-
#define __EXTERN_INLINE
13+
#define __EXTERN_INLINE inline
1414
#include <asm/io.h>
1515
#include <asm/core_t2.h>
1616
#undef __EXTERN_INLINE

arch/alpha/kernel/sys_jensen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Code supporting the Jensen.
99
*/
10-
#define __EXTERN_INLINE
10+
#define __EXTERN_INLINE inline
1111
#include <asm/io.h>
1212
#include <asm/jensen.h>
1313
#undef __EXTERN_INLINE

0 commit comments

Comments
 (0)