netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] drivers/net/wireless/orinoco.h: "extern inline" -> "static inline"
@ 2005-11-18  3:33 Adrian Bunk
       [not found] ` <20051118033329.GU11494-HeJ8Db2Gnd6zQB+pC5nmwQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2005-11-18  3:33 UTC (permalink / raw)
  To: proski, hermes; +Cc: orinoco-devel, linux-kernel, jgarzik, netdev

"extern inline" doesn't make much sense.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/net/wireless/orinoco.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.15-rc1-mm1-full/drivers/net/wireless/orinoco.h.old	2005-11-18 02:38:43.000000000 +0100
+++ linux-2.6.15-rc1-mm1-full/drivers/net/wireless/orinoco.h	2005-11-18 02:38:47.000000000 +0100
@@ -155,7 +155,7 @@
  * 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,
+static inline int orinoco_lock(struct orinoco_private *priv,
 			       unsigned long *flags)
 {
 	spin_lock_irqsave(&priv->lock, *flags);
@@ -168,7 +168,7 @@
 	return 0;
 }
 
-extern inline void orinoco_unlock(struct orinoco_private *priv,
+static inline void orinoco_unlock(struct orinoco_private *priv,
 				  unsigned long *flags)
 {
 	spin_unlock_irqrestore(&priv->lock, *flags);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.6 patch] drivers/net/wireless/orinoco.h: "extern inline" -> "static inline"
       [not found] ` <20051118033329.GU11494-HeJ8Db2Gnd6zQB+pC5nmwQ@public.gmane.org>
@ 2005-11-18  3:52   ` David Gibson
  2005-11-18  4:00     ` [Orinoco-devel] " Adrian Bunk
  0 siblings, 1 reply; 3+ messages in thread
From: David Gibson @ 2005-11-18  3:52 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: proski-mXXj517/zsQ,
	orinoco-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	jgarzik-e+AXbWqSrlAAvxtiuMwx3w, netdev-u79uwXL29TY76Z2rM5mHXA

On Fri, Nov 18, 2005 at 04:33:29AM +0100, Adrian Bunk wrote:
> "extern inline" doesn't make much sense.

Yes it does.  "extern inline" tells gcc not to fall back to out of
line version if it can't inline the function.  These functions *must*
by inlined, or they'll break horribly on Sparc, at least.

> --- linux-2.6.15-rc1-mm1-full/drivers/net/wireless/orinoco.h.old	2005-11-18 02:38:43.000000000 +0100
> +++ linux-2.6.15-rc1-mm1-full/drivers/net/wireless/orinoco.h	2005-11-18 02:38:47.000000000 +0100
> @@ -155,7 +155,7 @@
>   * 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,
> +static inline int orinoco_lock(struct orinoco_private *priv,
>  			       unsigned long *flags)
>  {
>  	spin_lock_irqsave(&priv->lock, *flags);
> @@ -168,7 +168,7 @@
>  	return 0;
>  }
>  
> -extern inline void orinoco_unlock(struct orinoco_private *priv,
> +static inline void orinoco_unlock(struct orinoco_private *priv,
>  				  unsigned long *flags)
>  {
>  	spin_unlock_irqrestore(&priv->lock, *flags);
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Orinoco-devel] [2.6 patch] drivers/net/wireless/orinoco.h: "extern inline" -> "static inline"
  2005-11-18  3:52   ` David Gibson
@ 2005-11-18  4:00     ` Adrian Bunk
  0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2005-11-18  4:00 UTC (permalink / raw)
  To: proski, orinoco-devel, linux-kernel, jgarzik, netdev

On Fri, Nov 18, 2005 at 02:52:36PM +1100, David Gibson wrote:
> On Fri, Nov 18, 2005 at 04:33:29AM +0100, Adrian Bunk wrote:
> > "extern inline" doesn't make much sense.
> 
> Yes it does.  "extern inline" tells gcc not to fall back to out of
> line version if it can't inline the function.  These functions *must*
> by inlined, or they'll break horribly on Sparc, at least.
>...

For any non-ancient gcc and !alpha, we are already telling gcc via 
__attribute__((always_inline)) that it should abort compilation if it 
can't inline the function.

The problem is that "extern inline" gives warnings with 
-Wmissing-prototypes, and I want to add this flag to the CFLAGS since it 
helps us to avoid a class of nasty runtime errors.

> David Gibson

cu
Adrian

-- 

       "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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-18  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-18  3:33 [2.6 patch] drivers/net/wireless/orinoco.h: "extern inline" -> "static inline" Adrian Bunk
     [not found] ` <20051118033329.GU11494-HeJ8Db2Gnd6zQB+pC5nmwQ@public.gmane.org>
2005-11-18  3:52   ` David Gibson
2005-11-18  4:00     ` [Orinoco-devel] " Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).