diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-06-10 18:33:19 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-12 00:19:41 +0200 |
commit | d0cc11477b9f8c2e03e9c4dad82b71ec5a2e63c7 (patch) | |
tree | 05a81b8f503d3cdca900e51d78c548e16dc35ca5 | |
parent | net/ibm/emac: use swap() in emac_make_bootlist() (diff) | |
download | linux-d0cc11477b9f8c2e03e9c4dad82b71ec5a2e63c7.tar.xz linux-d0cc11477b9f8c2e03e9c4dad82b71ec5a2e63c7.zip |
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: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c index 9b3639eae676..c5f299d74549 100644 --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c @@ -86,7 +86,7 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget) struct net_device *dev = fep->ndev; const struct fs_platform_info *fpi = fep->fpi; cbd_t __iomem *bdp; - struct sk_buff *skb, *skbn, *skbt; + struct sk_buff *skb, *skbn; int received = 0; u16 pkt_len, sc; int curidx; @@ -161,10 +161,7 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget) skb_reserve(skbn, 2); /* align IP header */ skb_copy_from_linear_data(skb, skbn->data, pkt_len); - /* swap */ - skbt = skb; - skb = skbn; - skbn = skbt; + swap(skb, skbn); } } else { skbn = netdev_alloc_skb(dev, ENET_RX_FRSIZE); |