Skip to contentSkip to conversation

bonding.h: "extern inline" -> "static inline"

PATCH Applied Adrian Bunk 2 participants 2 messages Dec 12, 2006 – Jan 19, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding.h: "extern inline" -> "static inline"

"extern inline" generates a warning with -Wmissing-prototypes and I'm currently working on getting the kernel cleaned up for adding this to the CFLAGS since it will help us to avoid a nasty class of runtime errors.

If there are places that really need a forced inline, __always_inline would be the correct solution.

---

 drivers/net/bonding/bonding.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/bonding/bonding.h renamed from drivers/net/bonding/bonding.h.old +3 -2
@@ -237,12 +237,13 @@
 #define BOND_ARP_VALIDATE_ALL		(BOND_ARP_VALIDATE_ACTIVE | \
 					 BOND_ARP_VALIDATE_BACKUP)
 
-extern inline int slave_do_arp_validate(struct bonding *bond, struct slave *slave)
+static inline int slave_do_arp_validate(struct bonding *bond,
+					struct slave *slave)
 {
 	return bond->params.arp_validate & (1 << slave->state);
 }
 
-extern inline u32 slave_last_rx(struct bonding *bond, struct slave *slave)
+static inline u32 slave_last_rx(struct bonding *bond, struct slave *slave)
 {
 	if (slave_do_arp_validate(bond, slave))
 		return slave->last_arp_rx;
Applied
#1 lore raw
Quoted 9 lines · Adrian Bunk

"extern inline" generates a warning with -Wmissing-prototypes and I'm currently working on getting the kernel cleaned up for adding this to the CFLAGS since it will help us to avoid a nasty class of runtime errors.

If there are places that really need a forced inline, __always_inline would be the correct solution.

applied