Skip to contentSkip to conversation

orinoco.h: "extern inline" -> "static __always_inline"

PATCH In review Adrian Bunk 2 participants 2 messages Aug 15, 2006

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

PATCH 1/1 orinoco.h: "extern inline" -> "static __always_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.

---

 drivers/net/wireless/orinoco.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/orinoco.h renamed from drivers/net/wireless/orinoco.h.old +4 -4
@@ -138,8 +138,8 @@
  * SPARC, due to its weird semantics for save/restore flags. extern
  * inline should prevent the kernel from linking or module from
  * loading if they are not inlined. */
-extern inline int orinoco_lock(struct orinoco_private *priv,
-			       unsigned long *flags)
+static __always_inline int orinoco_lock(struct orinoco_private *priv,
+					unsigned long *flags)
 {
 	spin_lock_irqsave(&priv->lock, *flags);
 	if (priv->hw_unavailable) {
@@ -151,8 +151,8 @@
 	return 0;
 }
 
-extern inline void orinoco_unlock(struct orinoco_private *priv,
-				  unsigned long *flags)
+static __always_inline void orinoco_unlock(struct orinoco_private *priv,
+					   unsigned long *flags)
 {
 	spin_unlock_irqrestore(&priv->lock, *flags);
 }
#1 lore raw
Quoted 6 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.

Thanks for the patch! I'm removing the last sentence in the comment as irrelevant and fixing the comment. The patch is being sent to netdev by StGIT, cc: author.

Signature · 2 lines
Regards,
Pavel Roskin