"extern inline" to "static inline" allows compile

"extern inline" to "static inline" allows compile

Post by Matt Repper » Sat, 14 Dec 2002 01:20:09



Hi,

I can't compile 2.5.51 on an EV56 without this. Tested, boots.
There are a bunch of symbols in core_cia.h that break the build if they're
extern inline because they're only defined in the header now. Make them
static inline instead. (Important, since they're #defined to things like
inb)

Comments?

Matt

diff -Nru a/include/asm-alpha/core_cia.h b/include/asm-alpha/core_cia.h
--- a/include/asm-alpha/core_cia.h      Thu Dec 12 16:59:06 2002

 #ifdef __KERNEL__

 #ifndef __EXTERN_INLINE
-#define __EXTERN_INLINE extern inline
+#define __EXTERN_INLINE static inline
 #define __IO_EXTERN_INLINE
 #endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

"extern inline" to "static inline" allows compile

Post by Richard Henderso » Sat, 14 Dec 2002 01:30:18



> Comments?

Revert the asm/pci.h change instead.

r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

"extern inline" to "static inline" allows compile

Post by Steffen Persvol » Sat, 14 Dec 2002 01:50:10




> > Comments?

> Revert the asm/pci.h change instead.

Is there a reason for the 'extern inline', to me it seems more natural to
have 'static inline' ?

Regards,
--
  Steffen Persvold   |       Scali AS      

Tel: (+47) 2262 8950 |   Olaf Helsets vei 6
Fax: (+47) 2262 8951 |   N0621 Oslo, NORWAY

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

"extern inline" to "static inline" allows compile

Post by Richard Henderso » Sat, 14 Dec 2002 02:00:06



> Is there a reason for the 'extern inline', to me it seems more natural to
> have 'static inline' ?

Yes.  Examine the entire __EXTERN_INLINE structure with
core_foo.[ch].

r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

"extern inline" to "static inline" allows compile

Post by Rusty Russel » Sat, 14 Dec 2002 02:30:10



Quote:> Hi,

> I can't compile 2.5.51 on an EV56 without this. Tested, boots.
> There are a bunch of symbols in core_cia.h that break the build if they're
> extern inline because they're only defined in the header now. Make them
> static inline instead. (Important, since they're #defined to things like
> inb)

> Comments?

This patch is simple, but not trivial, and since RTH wrote this, I'm
assuming all those __EXTERN_INLINE's are defined and undefned in
multiple places for a reason.

Richard?
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

"extern inline" to "static inline" allows compile

Post by Richard Henderso » Sat, 14 Dec 2002 11:30:12



> This patch is simple, but not trivial, and since RTH wrote this, I'm
> assuming all those __EXTERN_INLINE's are defined and undefned in
> multiple places for a reason.

Indeed.

Quote:> Richard?

Fixed properly by reverting the asm-alpha/pci.h patch
and including asm/io.h in drivers/scsi/sr_ioctl.c.

r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. why is "static inline" preferred over "extern inline"?

Please correct me if I am wrong here...

If a function can be inlined, there is no difference between "static
inline" and "extern inline".  If a function cannot be inlined, "static
inline" will have as many copies as needed, but "extern inline" will
just have one copy that is not defined external.

Why does Linux kernel prefer "static inline" over "extern inline"?
"static inline" seems always to generate bigger code size than "extern
inline" does.

Thanks

AH

2. Xloadimage --Where to get one??

3. GETSERVBYNAME()????????????????????"""""""""""""

4. Turning off special character

5. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

6. Mutex use in device drivers

7. Type "(", ")" and "{", "}" in X...

8. experienceing freezes because of mb/controller/hd

9. "umsdos" vs "vfat" vs "looped ext2"

10. "Novell-like","non-TCP/IP","networking" OS to place Unix

11. "netstat -nr" should show "default" or "0.0.0.0"?

12. "write" "to" "flon" commands

13. "--mode compile" instead of "--mode=compile" problem with libtool