Commit 20e84a6f authored by Al Viro's avatar Al Viro Committed by Arnd Bergmann

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Acked-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Acked-by: default avatarMatt Turner <mattst88@gmail.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent d92f1456
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Code common to all T2 core logic chips. * Code common to all T2 core logic chips.
*/ */
#define __EXTERN_INLINE #define __EXTERN_INLINE inline
#include <asm/io.h> #include <asm/io.h>
#include <asm/core_t2.h> #include <asm/core_t2.h>
#undef __EXTERN_INLINE #undef __EXTERN_INLINE
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* Code supporting the Jensen. * Code supporting the Jensen.
*/ */
#define __EXTERN_INLINE #define __EXTERN_INLINE inline
#include <asm/io.h> #include <asm/io.h>
#include <asm/jensen.h> #include <asm/jensen.h>
#undef __EXTERN_INLINE #undef __EXTERN_INLINE
......
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