Commit d0cc1147 authored by Fabian Frederick's avatar Fabian Frederick Committed by David S. Miller

net: fs_enet: use swap() in fs_enet_rx_napi()

Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c9003ec8
...@@ -86,7 +86,7 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget) ...@@ -86,7 +86,7 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget)
struct net_device *dev = fep->ndev; struct net_device *dev = fep->ndev;
const struct fs_platform_info *fpi = fep->fpi; const struct fs_platform_info *fpi = fep->fpi;
cbd_t __iomem *bdp; cbd_t __iomem *bdp;
struct sk_buff *skb, *skbn, *skbt; struct sk_buff *skb, *skbn;
int received = 0; int received = 0;
u16 pkt_len, sc; u16 pkt_len, sc;
int curidx; int curidx;
...@@ -161,10 +161,7 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget) ...@@ -161,10 +161,7 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget)
skb_reserve(skbn, 2); /* align IP header */ skb_reserve(skbn, 2); /* align IP header */
skb_copy_from_linear_data(skb, skb_copy_from_linear_data(skb,
skbn->data, pkt_len); skbn->data, pkt_len);
/* swap */ swap(skb, skbn);
skbt = skb;
skb = skbn;
skbn = skbt;
} }
} else { } else {
skbn = netdev_alloc_skb(dev, ENET_RX_FRSIZE); skbn = netdev_alloc_skb(dev, ENET_RX_FRSIZE);
......
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