Skip to contentSkip to conversation

"extern inline" doesn't make sense

PATCH New Adrian Bunk 3 participants 5 messages Aug 19, 2005 – Aug 22, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 "extern inline" doesn't make sense

"extern inline" doesn't make sense.

fs/adfs/adfs.h renamed from fs/adfs/adfs.h.old +2 -2
@@ -97,7 +97,7 @@
 extern struct inode_operations adfs_file_inode_operations;
 extern struct file_operations adfs_file_operations;
 
-extern inline __u32 signed_asl(__u32 val, signed int shift)
+static inline __u32 signed_asl(__u32 val, signed int shift)
 {
 	if (shift >= 0)
 		val <<= shift;
@@ -112,7 +112,7 @@
  *
  * The root directory ID should always be looked up in the map [3.4]
  */
-extern inline int
+static inline int
 __adfs_block_map(struct super_block *sb, unsigned int object_id,
 		 unsigned int block)
 {
#1 lore raw

PATCH 1/1 fs/adfs/adfs.h: "extern inline" doesn't make sense

[ this time with a better subject ]

"extern inline" doesn't make sense.

fs/adfs/adfs.h renamed from fs/adfs/adfs.h.old +2 -2
@@ -97,7 +97,7 @@
 extern struct inode_operations adfs_file_inode_operations;
 extern struct file_operations adfs_file_operations;
 
-extern inline __u32 signed_asl(__u32 val, signed int shift)
+static inline __u32 signed_asl(__u32 val, signed int shift)
 {
 	if (shift >= 0)
 		val <<= shift;
@@ -112,7 +112,7 @@
  *
  * The root directory ID should always be looked up in the map [3.4]
  */
-extern inline int
+static inline int
 __adfs_block_map(struct super_block *sb, unsigned int object_id,
 		 unsigned int block)
 {
#2 lore raw

Re: [2.6 patch] fs/adfs/adfs.h: "extern inline" doesn't make sense

Quoted 3 lines · Adrian Bunk

"extern inline" doesn't make sense.

Thanks Adrian - I've committed it to my tree.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#4 lore raw

Re: [2.6 patch] fs/adfs/adfs.h: "extern inline" doesn't make sense

Quoted 11 lines · Pierre Ossman
Quoted 7 lines · Adrian Bunk

[ this time with a better subject ]

"extern inline" doesn't make sense.

Isn't 'extern inline' an old gcc trick to force inlining? (instead of just hinting)

For gcc >= 3.1, we are already telling the compiler that it should either inline the code or abort compilation.

"extern inline" doesn't make much sense. And it gives a warning with -Wmissing-prototypes.

I'm currently cleaning up warnings with -Wmissing-prototypes to get them to an acceptable level. -Wmissing-prototypes will help us to enforce a coding style that will avoid a class of nasty runtime errors that are currently sometimes hitting us.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed