* [2.6 patch] net/hamachi.c: remove bogus inline at function prototype (fwd)
@ 2004-07-29 14:05 Adrian Bunk
2004-08-01 11:21 ` Jesper Juhl
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2004-07-29 14:05 UTC (permalink / raw)
To: jgarzik, Andrew Morton; +Cc: linux-kernel, linux-net
FYI:
The patch forwarded below is still required in 2.6.8-rc2-mm1.
----- Forwarded message from Adrian Bunk <bunk@fs.tum.de> -----
Date: Wed, 14 Jul 2004 23:52:56 +0200
From: Adrian Bunk <bunk@fs.tum.de>
To: jgarzik@pobox.com
Cc: linux-kernel@vger.kernel.org, linux-net@vger.kernel.org
Subject: [2.6 patch] net/hamachi.c: remove bogus inline at function prototype
Trying to compile drivers/net/hamachi.c in 2.6.8-rc1-mm1 using gcc 3.4
results in the folloeing compile error:
<-- snip -->
...
CC drivers/net/hamachi.o
drivers/net/hamachi.c: In function `hamachi_interrupt':
drivers/net/hamachi.c:562: sorry, unimplemented: inlining failed in call
to 'hamachi_rx': function body not available
drivers/net/hamachi.c:1402: sorry, unimplemented: called from here
make[2]: *** [drivers/net/hamachi.o] Error 1
<-- snip -->
The inline at the prototype is bogus since the function itself is not
marked as inline.
Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
--- linux-2.6.7-mm6-full-gcc3.4/drivers/net/hamachi.c.old 2004-07-09 00:28:31.000000000 +0200
+++ linux-2.6.7-mm6-full-gcc3.4/drivers/net/hamachi.c 2004-07-09 00:30:18.000000000 +0200
@@ -559,7 +559,7 @@
static void hamachi_init_ring(struct net_device *dev);
static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t hamachi_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
-static inline int hamachi_rx(struct net_device *dev);
+static int hamachi_rx(struct net_device *dev);
static inline int hamachi_tx(struct net_device *dev);
static void hamachi_error(struct net_device *dev, int intr_status);
static int hamachi_close(struct net_device *dev);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
----- End forwarded message -----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] net/hamachi.c: remove bogus inline at function prototype (fwd)
2004-07-29 14:05 [2.6 patch] net/hamachi.c: remove bogus inline at function prototype (fwd) Adrian Bunk
@ 2004-08-01 11:21 ` Jesper Juhl
2004-08-01 11:38 ` Adrian Bunk
0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2004-08-01 11:21 UTC (permalink / raw)
To: Adrian Bunk; +Cc: jgarzik, Andrew Morton, linux-kernel, linux-net
On Thu, 29 Jul 2004, Adrian Bunk wrote:
>
> FYI:
> The patch forwarded below is still required in 2.6.8-rc2-mm1.
>
>
> ----- Forwarded message from Adrian Bunk <bunk@fs.tum.de> -----
>
> Date: Wed, 14 Jul 2004 23:52:56 +0200
> From: Adrian Bunk <bunk@fs.tum.de>
> To: jgarzik@pobox.com
> Cc: linux-kernel@vger.kernel.org, linux-net@vger.kernel.org
> Subject: [2.6 patch] net/hamachi.c: remove bogus inline at function prototype
>
> Trying to compile drivers/net/hamachi.c in 2.6.8-rc1-mm1 using gcc 3.4
> results in the folloeing compile error:
>
> <-- snip -->
>
> ...
> CC drivers/net/hamachi.o
> drivers/net/hamachi.c: In function `hamachi_interrupt':
> drivers/net/hamachi.c:562: sorry, unimplemented: inlining failed in call
> to 'hamachi_rx': function body not available
> drivers/net/hamachi.c:1402: sorry, unimplemented: called from here
> make[2]: *** [drivers/net/hamachi.o] Error 1
>
> <-- snip -->
>
>
> The inline at the prototype is bogus since the function itself is not
> marked as inline.
>
>
> Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
>
> --- linux-2.6.7-mm6-full-gcc3.4/drivers/net/hamachi.c.old 2004-07-09 00:28:31.000000000 +0200
> +++ linux-2.6.7-mm6-full-gcc3.4/drivers/net/hamachi.c 2004-07-09 00:30:18.000000000 +0200
> @@ -559,7 +559,7 @@
> static void hamachi_init_ring(struct net_device *dev);
> static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev);
> static irqreturn_t hamachi_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
> -static inline int hamachi_rx(struct net_device *dev);
> +static int hamachi_rx(struct net_device *dev);
> static inline int hamachi_tx(struct net_device *dev);
> static void hamachi_error(struct net_device *dev, int intr_status);
> static int hamachi_close(struct net_device *dev);
>
Wouldn't it make sense to also un-inline hamachi_tx? both the _rx and _tx
functions are quite big - are they really suitable to be inlined?
Here's a proposed patch against 2.6.8-rc2-mm1
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
diff -up linux-2.6.8-rc2-mm1-orig/drivers/net/hamachi.c linux-2.6.8-rc2-mm1/drivers/net/hamachi.c
--- linux-2.6.8-rc2-mm1-orig/drivers/net/hamachi.c 2004-07-31 13:12:52.000000000 +0200
+++ linux-2.6.8-rc2-mm1/drivers/net/hamachi.c 2004-08-01 13:18:43.000000000 +0200
@@ -559,8 +559,8 @@ static void hamachi_tx_timeout(struct ne
static void hamachi_init_ring(struct net_device *dev);
static int hamachi_start_xmit(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t hamachi_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
-static inline int hamachi_rx(struct net_device *dev);
-static inline int hamachi_tx(struct net_device *dev);
+static int hamachi_rx(struct net_device *dev);
+static int hamachi_tx(struct net_device *dev);
static void hamachi_error(struct net_device *dev, int intr_status);
static int hamachi_close(struct net_device *dev);
static struct net_device_stats *hamachi_get_stats(struct net_device *dev);
@@ -998,7 +998,7 @@ static int hamachi_open(struct net_devic
return 0;
}
-static inline int hamachi_tx(struct net_device *dev)
+static int hamachi_tx(struct net_device *dev)
{
struct hamachi_private *hmp = dev->priv;
/Jesper Juhl
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] net/hamachi.c: remove bogus inline at function prototype (fwd)
2004-08-01 11:21 ` Jesper Juhl
@ 2004-08-01 11:38 ` Adrian Bunk
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2004-08-01 11:38 UTC (permalink / raw)
To: Jesper Juhl; +Cc: jgarzik, Andrew Morton, linux-kernel, linux-net
On Sun, Aug 01, 2004 at 01:21:22PM +0200, Jesper Juhl wrote:
>...
> Wouldn't it make sense to also un-inline hamachi_tx? both the _rx and _tx
My primary goal was to fix the compilation with gcc 3.4, not to evaluate
all inlines (which is also a good thing to do).
> functions are quite big - are they really suitable to be inlined?
Each of thamachi_{tx,rx} has exacly one caller, which might be a reason
in favor of inlining.
> Here's a proposed patch against 2.6.8-rc2-mm1
>...
Looks good.
> /Jesper Juhl
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:[~2004-08-01 11:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-29 14:05 [2.6 patch] net/hamachi.c: remove bogus inline at function prototype (fwd) Adrian Bunk
2004-08-01 11:21 ` Jesper Juhl
2004-08-01 11:38 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®