sunhme: remove unnecessary setting of skb->dev
authorJon Mason <jdmason@kudzu.us>
Mon, 9 Jul 2012 14:09:34 +0000 (14:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jul 2012 06:24:57 +0000 (23:24 -0700)
skb->dev is being unnecessarily set during ring init and skb alloc in rx.  It is
already being set to the proper value when eth_type_trans is called on packet
receive, and the skb->dev is not referenced anywhere else in the code.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/sunhme.c

index dfc00c4683e5ab68622032940bd25b289f59add3..73f341b8befbe2e719ce131168c6ceda4f269a48 100644 (file)
@@ -1249,7 +1249,6 @@ static void happy_meal_clean_rings(struct happy_meal *hp)
 static void happy_meal_init_rings(struct happy_meal *hp)
 {
        struct hmeal_init_block *hb = hp->happy_block;
-       struct net_device *dev = hp->dev;
        int i;
 
        HMD(("happy_meal_init_rings: counters to zero, "));
@@ -1270,7 +1269,6 @@ static void happy_meal_init_rings(struct happy_meal *hp)
                        continue;
                }
                hp->rx_skbs[i] = skb;
-               skb->dev = dev;
 
                /* Because we reserve afterwards. */
                skb_put(skb, (ETH_FRAME_LEN + RX_OFFSET + 4));
@@ -2031,7 +2029,6 @@ static void happy_meal_rx(struct happy_meal *hp, struct net_device *dev)
                        }
                        dma_unmap_single(hp->dma_dev, dma_addr, RX_BUF_ALLOC_SIZE, DMA_FROM_DEVICE);
                        hp->rx_skbs[elem] = new_skb;
-                       new_skb->dev = dev;
                        skb_put(new_skb, (ETH_FRAME_LEN + RX_OFFSET + 4));
                        hme_write_rxd(hp, this,
                                      (RXFLAG_OWN|((RX_BUF_ALLOC_SIZE-RX_OFFSET)<<16)),