All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@kudzu.us>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 10/11] sunhme: remove unnecessary setting of skb->dev
Date: Mon,  9 Jul 2012 17:09:34 -0700	[thread overview]
Message-ID: <1341878975-10577-10-git-send-email-jdmason@kudzu.us> (raw)
In-Reply-To: <1341878975-10577-1-git-send-email-jdmason@kudzu.us>

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>
---
 drivers/net/ethernet/sun/sunhme.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index dfc00c4..73f341b 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -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)),
-- 
1.7.9.5

  parent reply	other threads:[~2012-07-10  0:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10  0:09 [PATCH 01/11] lance: remove unnecessary setting of skb->dev Jon Mason
2012-07-10  0:09 ` [PATCH 02/11] enic: " Jon Mason
2012-07-12 21:19   ` Jon Mason
2012-07-12 21:23     ` Christian Benvenuti (benve)
2012-07-13  4:56       ` Neel Patel (neepatel)
2012-07-10  0:09 ` [PATCH 03/11] netxen: " Jon Mason
2012-07-10  0:09 ` [PATCH 04/11] lantiq_etop: " Jon Mason
2012-07-10  0:09 ` [PATCH 05/11] ksz884x: " Jon Mason
2012-07-10  0:09 ` [PATCH 06/11] qlcnic: " Jon Mason
2012-07-10  0:09 ` [PATCH 07/11] qlge: " Jon Mason
2012-07-10  0:09 ` [PATCH 08/11] sunbmac: " Jon Mason
2012-07-10  0:09 ` [PATCH 09/11] sungem: " Jon Mason
2012-07-10  0:09 ` Jon Mason [this message]
2012-07-10  0:09 ` [PATCH 11/11] ll_temac: " Jon Mason
2012-07-11  6:18 ` [PATCH 01/11] lance: " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1341878975-10577-10-git-send-email-jdmason@kudzu.us \
    --to=jdmason@kudzu.us \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.