* [PATCH next] sgi-xp: Kill directly reference of netdev->priv
@ 2008-12-04 12:56 Wang Chen
2008-12-04 13:41 ` Ilpo Järvinen
0 siblings, 1 reply; 3+ messages in thread
From: Wang Chen @ 2008-12-04 12:56 UTC (permalink / raw)
To: David S. Miller, NETDEV
Simply replace netdev->priv with netdev_priv().
Not do compile test, because no IA64 or x86_64 box.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
drivers/misc/sgi-xp/xpnet.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
index 71513b3..9e5233a 100644
--- a/drivers/misc/sgi-xp/xpnet.c
+++ b/drivers/misc/sgi-xp/xpnet.c
@@ -154,7 +154,7 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg)
void *dst;
enum xp_retval ret;
struct xpnet_dev_private *priv =
- (struct xpnet_dev_private *)xpnet_device->priv;
+ (struct xpnet_dev_private *)netdev_priv(xpnet_device);
if (!XPNET_VALID_MSG(msg)) {
/*
@@ -370,7 +370,7 @@ xpnet_dev_get_stats(struct net_device *dev)
{
struct xpnet_dev_private *priv;
- priv = (struct xpnet_dev_private *)dev->priv;
+ priv = (struct xpnet_dev_private *)netdev_priv(dev);
return &priv->stats;
}
@@ -456,7 +456,8 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct xpnet_pending_msg *queued_msg;
u64 start_addr, end_addr;
short dest_partid;
- struct xpnet_dev_private *priv = (struct xpnet_dev_private *)dev->priv;
+ struct xpnet_dev_private *priv =
+ (struct xpnet_dev_private *)netdev_priv(dev);
u16 embedded_bytes = 0;
dev_dbg(xpnet, ">skb->head=0x%p skb->data=0x%p skb->tail=0x%p "
@@ -543,7 +544,7 @@ xpnet_dev_tx_timeout(struct net_device *dev)
{
struct xpnet_dev_private *priv;
- priv = (struct xpnet_dev_private *)dev->priv;
+ priv = (struct xpnet_dev_private *)netdev_priv(dev);
priv->stats.tx_errors++;
return;
--
1.5.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH next] sgi-xp: Kill directly reference of netdev->priv
2008-12-04 12:56 [PATCH next] sgi-xp: Kill directly reference of netdev->priv Wang Chen
@ 2008-12-04 13:41 ` Ilpo Järvinen
2008-12-04 23:12 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Ilpo Järvinen @ 2008-12-04 13:41 UTC (permalink / raw)
To: Wang Chen; +Cc: David S. Miller, NETDEV
On Thu, 4 Dec 2008, Wang Chen wrote:
> Simply replace netdev->priv with netdev_priv().
>
> Not do compile test, because no IA64 or x86_64 box.
>
> Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
> ---
> drivers/misc/sgi-xp/xpnet.c | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
> index 71513b3..9e5233a 100644
> --- a/drivers/misc/sgi-xp/xpnet.c
> +++ b/drivers/misc/sgi-xp/xpnet.c
> @@ -154,7 +154,7 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg)
> void *dst;
> enum xp_retval ret;
> struct xpnet_dev_private *priv =
> - (struct xpnet_dev_private *)xpnet_device->priv;
> + (struct xpnet_dev_private *)netdev_priv(xpnet_device);
netdev_priv returns void, so these casts seem unnecessary here & other
places belwo (which I cut)...
--
i.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH next] sgi-xp: Kill directly reference of netdev->priv
2008-12-04 13:41 ` Ilpo Järvinen
@ 2008-12-04 23:12 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2008-12-04 23:12 UTC (permalink / raw)
To: ilpo.jarvinen; +Cc: wangchen, netdev
From: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Date: Thu, 4 Dec 2008 15:41:15 +0200 (EET)
> On Thu, 4 Dec 2008, Wang Chen wrote:
>
> > Simply replace netdev->priv with netdev_priv().
> >
> > Not do compile test, because no IA64 or x86_64 box.
> >
> > Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
> > ---
> > drivers/misc/sgi-xp/xpnet.c | 9 +++++----
> > 1 files changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
> > index 71513b3..9e5233a 100644
> > --- a/drivers/misc/sgi-xp/xpnet.c
> > +++ b/drivers/misc/sgi-xp/xpnet.c
> > @@ -154,7 +154,7 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg)
> > void *dst;
> > enum xp_retval ret;
> > struct xpnet_dev_private *priv =
> > - (struct xpnet_dev_private *)xpnet_device->priv;
> > + (struct xpnet_dev_private *)netdev_priv(xpnet_device);
>
> netdev_priv returns void, so these casts seem unnecessary here & other
> places belwo (which I cut)...
I took care of fixing this up when applying Wang's patch.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-04 23:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-04 12:56 [PATCH next] sgi-xp: Kill directly reference of netdev->priv Wang Chen
2008-12-04 13:41 ` Ilpo Järvinen
2008-12-04 23:12 ` 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).