* [PATCH] Use __always_inline in orinoco_lock()/orinoco_unlock()
@ 2006-08-15 19:25 Pavel Roskin
2006-08-15 22:50 ` Dave Jones
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Roskin @ 2006-08-15 19:25 UTC (permalink / raw)
To: netdev; +Cc: Adrian Bunk
From: Pavel Roskin <proski@gnu.org>
This is exactly the case when they are needed. This also fixed a
warning with -Wmissing-prototypes
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
drivers/net/wireless/orinoco.h | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h
index 16db3e1..8fd9b32 100644
--- a/drivers/net/wireless/orinoco.h
+++ b/drivers/net/wireless/orinoco.h
@@ -135,11 +135,9 @@ extern irqreturn_t orinoco_interrupt(int
/********************************************************************/
/* These functions *must* be inline or they will break horribly on
- * 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)
+ * SPARC, due to its weird semantics for save/restore 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 +149,8 @@ extern inline int orinoco_lock(struct or
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);
}
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Use __always_inline in orinoco_lock()/orinoco_unlock()
2006-08-15 19:25 [PATCH] Use __always_inline in orinoco_lock()/orinoco_unlock() Pavel Roskin
@ 2006-08-15 22:50 ` Dave Jones
2006-08-15 22:54 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Dave Jones @ 2006-08-15 22:50 UTC (permalink / raw)
To: Pavel Roskin; +Cc: netdev, Adrian Bunk
On Tue, Aug 15, 2006 at 03:25:58PM -0400, Pavel Roskin wrote:
> diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h
> index 16db3e1..8fd9b32 100644
> --- a/drivers/net/wireless/orinoco.h
> +++ b/drivers/net/wireless/orinoco.h
> @@ -135,11 +135,9 @@ extern irqreturn_t orinoco_interrupt(int
> /********************************************************************/
>
> /* These functions *must* be inline or they will break horribly on
> - * 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)
> + * SPARC, due to its weird semantics for save/restore flags. */
Didn't that get fixed up for SPARC a year or so back?
Dave
--
http://www.codemonkey.org.uk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Use __always_inline in orinoco_lock()/orinoco_unlock()
2006-08-15 22:50 ` Dave Jones
@ 2006-08-15 22:54 ` David Miller
2006-08-15 23:14 ` Pavel Roskin
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2006-08-15 22:54 UTC (permalink / raw)
To: davej; +Cc: proski, netdev, bunk
From: Dave Jones <davej@redhat.com>
Date: Tue, 15 Aug 2006 18:50:12 -0400
> On Tue, Aug 15, 2006 at 03:25:58PM -0400, Pavel Roskin wrote:
>
> > diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h
> > index 16db3e1..8fd9b32 100644
> > --- a/drivers/net/wireless/orinoco.h
> > +++ b/drivers/net/wireless/orinoco.h
> > @@ -135,11 +135,9 @@ extern irqreturn_t orinoco_interrupt(int
> > /********************************************************************/
> >
> > /* These functions *must* be inline or they will break horribly on
> > - * 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)
> > + * SPARC, due to its weird semantics for save/restore flags. */
>
> Didn't that get fixed up for SPARC a year or so back?
That's right, this problem no longer exists.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Use __always_inline in orinoco_lock()/orinoco_unlock()
2006-08-15 22:54 ` David Miller
@ 2006-08-15 23:14 ` Pavel Roskin
2006-08-15 23:26 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Roskin @ 2006-08-15 23:14 UTC (permalink / raw)
To: David Miller; +Cc: davej, netdev, bunk
On Tue, 2006-08-15 at 15:54 -0700, David Miller wrote:
> > > /* These functions *must* be inline or they will break horribly on
> > > - * 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)
> > > + * SPARC, due to its weird semantics for save/restore flags. */
> >
> > Didn't that get fixed up for SPARC a year or so back?
>
> That's right, this problem no longer exists.
Then, I guess, "static inline" would be just fine, right?
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Use __always_inline in orinoco_lock()/orinoco_unlock()
2006-08-15 23:14 ` Pavel Roskin
@ 2006-08-15 23:26 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2006-08-15 23:26 UTC (permalink / raw)
To: proski; +Cc: davej, netdev, bunk
From: Pavel Roskin <proski@gnu.org>
Date: Tue, 15 Aug 2006 19:14:32 -0400
> On Tue, 2006-08-15 at 15:54 -0700, David Miller wrote:
> > > > /* These functions *must* be inline or they will break horribly on
> > > > - * 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)
> > > > + * SPARC, due to its weird semantics for save/restore flags. */
> > >
> > > Didn't that get fixed up for SPARC a year or so back?
> >
> > That's right, this problem no longer exists.
>
> Then, I guess, "static inline" would be just fine, right?
Yep.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-08-15 23:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-15 19:25 [PATCH] Use __always_inline in orinoco_lock()/orinoco_unlock() Pavel Roskin
2006-08-15 22:50 ` Dave Jones
2006-08-15 22:54 ` David Miller
2006-08-15 23:14 ` Pavel Roskin
2006-08-15 23:26 ` David Miller
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).