All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/11] lance: remove unnecessary setting of skb->dev
@ 2012-07-10  0:09 Jon Mason
  2012-07-10  0:09 ` [PATCH 02/11] enic: " Jon Mason
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: Jon Mason @ 2012-07-10  0:09 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

skb->dev is being unnecessarily set during ring init.  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/amd/lance.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/amd/lance.c b/drivers/net/ethernet/amd/lance.c
index a6e2e84..5c72843 100644
--- a/drivers/net/ethernet/amd/lance.c
+++ b/drivers/net/ethernet/amd/lance.c
@@ -873,10 +873,9 @@ lance_init_ring(struct net_device *dev, gfp_t gfp)
 
 		skb = alloc_skb(PKT_BUF_SZ, GFP_DMA | gfp);
 		lp->rx_skbuff[i] = skb;
-		if (skb) {
-			skb->dev = dev;
+		if (skb)
 			rx_buff = skb->data;
-		} else
+		else
 			rx_buff = kmalloc(PKT_BUF_SZ, GFP_DMA | gfp);
 		if (rx_buff == NULL)
 			lp->rx_ring[i].base = 0;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-07-13  5:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 10/11] sunhme: " Jon Mason
2012-07-10  0:09 ` [PATCH 11/11] ll_temac: " Jon Mason
2012-07-11  6:18 ` [PATCH 01/11] lance: " David Miller

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.