Commit 3f9b766c authored by Wang Chen's avatar Wang Chen Committed by David S. Miller

sgi-xp: Kill directly reference of netdev->priv

Simply replace netdev->priv with netdev_priv().

[ Kill unnecessary casts, noticed by Ilpo -DaveM ]
Signed-off-by: default avatarWang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 17c324fa
...@@ -153,8 +153,7 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg) ...@@ -153,8 +153,7 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg)
struct sk_buff *skb; struct sk_buff *skb;
void *dst; void *dst;
enum xp_retval ret; enum xp_retval ret;
struct xpnet_dev_private *priv = struct xpnet_dev_private *priv = netdev_priv(xpnet_device);
(struct xpnet_dev_private *)xpnet_device->priv;
if (!XPNET_VALID_MSG(msg)) { if (!XPNET_VALID_MSG(msg)) {
/* /*
...@@ -368,9 +367,7 @@ xpnet_dev_set_config(struct net_device *dev, struct ifmap *new_map) ...@@ -368,9 +367,7 @@ xpnet_dev_set_config(struct net_device *dev, struct ifmap *new_map)
static struct net_device_stats * static struct net_device_stats *
xpnet_dev_get_stats(struct net_device *dev) xpnet_dev_get_stats(struct net_device *dev)
{ {
struct xpnet_dev_private *priv; struct xpnet_dev_private *priv = netdev_priv(dev);
priv = (struct xpnet_dev_private *)dev->priv;
return &priv->stats; return &priv->stats;
} }
...@@ -456,7 +453,7 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -456,7 +453,7 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct xpnet_pending_msg *queued_msg; struct xpnet_pending_msg *queued_msg;
u64 start_addr, end_addr; u64 start_addr, end_addr;
short dest_partid; short dest_partid;
struct xpnet_dev_private *priv = (struct xpnet_dev_private *)dev->priv; struct xpnet_dev_private *priv = netdev_priv(dev);
u16 embedded_bytes = 0; u16 embedded_bytes = 0;
dev_dbg(xpnet, ">skb->head=0x%p skb->data=0x%p skb->tail=0x%p " dev_dbg(xpnet, ">skb->head=0x%p skb->data=0x%p skb->tail=0x%p "
...@@ -541,9 +538,7 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -541,9 +538,7 @@ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
static void static void
xpnet_dev_tx_timeout(struct net_device *dev) xpnet_dev_tx_timeout(struct net_device *dev)
{ {
struct xpnet_dev_private *priv; struct xpnet_dev_private *priv = netdev_priv(dev);
priv = (struct xpnet_dev_private *)dev->priv;
priv->stats.tx_errors++; priv->stats.tx_errors++;
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment