Skip to content

Commit

Permalink
sunbmac: remove unnecessary setting of skb->dev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jon Mason authored and David S. Miller committed Jul 11, 2012
1 parent c768b68 commit eb716c5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/sun/sunbmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ static void bigmac_init_rings(struct bigmac *bp, int from_irq)
continue;

bp->rx_skbs[i] = skb;
skb->dev = dev;

/* Because we reserve afterwards. */
skb_put(skb, ETH_FRAME_LEN);
Expand Down Expand Up @@ -838,7 +837,6 @@ static void bigmac_rx(struct bigmac *bp)
RX_BUF_ALLOC_SIZE - 34,
DMA_FROM_DEVICE);
bp->rx_skbs[elem] = new_skb;
new_skb->dev = bp->dev;
skb_put(new_skb, ETH_FRAME_LEN);
skb_reserve(new_skb, 34);
this->rx_addr =
Expand Down

0 comments on commit eb716c5

Please sign in to comment.