netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/6] [NET] ixp2000/enp2611: don't set non-existent member get_stats
       [not found] <20090807203939.GA19374@pengutronix.de>
@ 2009-08-07 20:42 ` Uwe Kleine-König
  2009-08-10  4:49   ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2009-08-07 20:42 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, rt-users, Russell King, Dmitry Baryshkov, Lennert Buytenhek,
	netdev

This fixes a build failure for 2.6.31-rc5 (ARCH=arm, ixp2000_defconfig):

	  CC      drivers/net/ixp2000/enp2611.o
	drivers/net/ixp2000/enp2611.c: In function 'enp2611_init_module':
	drivers/net/ixp2000/enp2611.c:213: error: 'struct net_device' has no member named 'get_stats'

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: netdev@vger.kernel.org
---
Hello,

obviously this has the downside that the stats won't work, I let the fix
for someone else :-)

Best regards
Uwe
---
 drivers/net/ixp2000/enp2611.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ixp2000/enp2611.c b/drivers/net/ixp2000/enp2611.c
index b02a981..d6ef176 100644
--- a/drivers/net/ixp2000/enp2611.c
+++ b/drivers/net/ixp2000/enp2611.c
@@ -210,7 +210,7 @@ static int __init enp2611_init_module(void)
 			return -ENOMEM;
 		}
 
-		nds[i]->get_stats = enp2611_get_stats;
+		/* nds[i]->get_stats = enp2611_get_stats; */
 		pm3386_init_port(i);
 		pm3386_get_mac(i, nds[i]->dev_addr);
 	}
-- 
1.6.3.3

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

* Re: [PATCH 5/6] [NET] ixp2000/enp2611: don't set non-existent member get_stats
  2009-08-07 20:42 ` [PATCH 5/6] [NET] ixp2000/enp2611: don't set non-existent member get_stats Uwe Kleine-König
@ 2009-08-10  4:49   ` David Miller
  2009-08-10  9:40     ` Uwe Kleine-König
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2009-08-10  4:49 UTC (permalink / raw)
  To: u.kleine-koenig
  Cc: tglx, linux-kernel, linux-rt-users, linux, dbaryshkov, kernel,
	netdev

From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date: Fri,  7 Aug 2009 22:42:40 +0200

> This fixes a build failure for 2.6.31-rc5 (ARCH=arm, ixp2000_defconfig):
> 
> 	  CC      drivers/net/ixp2000/enp2611.o
> 	drivers/net/ixp2000/enp2611.c: In function 'enp2611_init_module':
> 	drivers/net/ixp2000/enp2611.c:213: error: 'struct net_device' has no member named 'get_stats'
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

This is far from the way to fix this, unfortunately.

We need to find a way to propagate this assignment into
the netdev_ops method vector instead.
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 5/6] [NET] ixp2000/enp2611: don't set non-existent member get_stats
  2009-08-10  4:49   ` David Miller
@ 2009-08-10  9:40     ` Uwe Kleine-König
  2009-08-10 15:00       ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2009-08-10  9:40 UTC (permalink / raw)
  To: David Miller
  Cc: tglx, linux-kernel, linux-rt-users, linux, dbaryshkov, kernel,
	netdev

Hello,

On Sun, Aug 09, 2009 at 09:49:06PM -0700, David Miller wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Date: Fri,  7 Aug 2009 22:42:40 +0200
> 
> > This fixes a build failure for 2.6.31-rc5 (ARCH=arm, ixp2000_defconfig):
> > 
> > 	  CC      drivers/net/ixp2000/enp2611.o
> > 	drivers/net/ixp2000/enp2611.c: In function 'enp2611_init_module':
> > 	drivers/net/ixp2000/enp2611.c:213: error: 'struct net_device' has no member named 'get_stats'
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> This is far from the way to fix this, unfortunately.
> 
> We need to find a way to propagate this assignment into
> the netdev_ops method vector instead.
Yes, I tried that, but stopped when I saw it's declared const.  I don't
know if this is required.  If yes then the only way to fix it is to add
a platform callback that is called if non-NULL.

I don't want to invest time here without a word by the maintainers
though.

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

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

* Re: [PATCH 5/6] [NET] ixp2000/enp2611: don't set non-existent member get_stats
  2009-08-10  9:40     ` Uwe Kleine-König
@ 2009-08-10 15:00       ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-08-10 15:00 UTC (permalink / raw)
  To: u.kleine-koenig
  Cc: tglx, linux-kernel, linux-rt-users, linux, dbaryshkov, kernel,
	netdev

From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date: Mon, 10 Aug 2009 11:40:27 +0200

> Yes, I tried that, but stopped when I saw it's declared const.  I don't
> know if this is required.  If yes then the only way to fix it is to add
> a platform callback that is called if non-NULL.

The easiest way to handle this is to have another copy of the ops,
which has the other get_stats member value, and to assign that as
the netdev_ops when the relevant condition holds.

> I don't want to invest time here without a word by the maintainers
> though.

But we can't apply the patch you initially posted, that's for sure
:-)
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2009-08-10 15:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20090807203939.GA19374@pengutronix.de>
2009-08-07 20:42 ` [PATCH 5/6] [NET] ixp2000/enp2611: don't set non-existent member get_stats Uwe Kleine-König
2009-08-10  4:49   ` David Miller
2009-08-10  9:40     ` Uwe Kleine-König
2009-08-10 15:00       ` 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).