Patchwork greth: Remove unnecessary memset of napi member in netdev private data

login
register
mail settings
Submitter Tobias Klauser
Date June 4, 2010, 6:24 a.m.
Message ID <1275632661-16406-1-git-send-email-tklauser@distanz.ch>
Download mbox | patch
Permalink /patch/54539/
State Accepted
Delegated to: David Miller
Headers show

Comments

Tobias Klauser - June 4, 2010, 6:24 a.m.
The memory for the private data is allocated using kzalloc in
alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to
set the napi member to 0 explicitely.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/net/greth.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
David Miller - June 7, 2010, 8:21 a.m.
From: Tobias Klauser <tklauser@distanz.ch>
Date: Fri,  4 Jun 2010 08:24:21 +0200

> The memory for the private data is allocated using kzalloc in
> alloc_etherdev (or alloc_netdev_mq respectively) so there is no need to
> set the napi member to 0 explicitely.
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 3a029d0..4d09eab 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -1555,7 +1555,6 @@  static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_dev
 	}
 
 	/* setup NAPI */
-	memset(&greth->napi, 0, sizeof(greth->napi));
 	netif_napi_add(dev, &greth->napi, greth_poll, 64);
 
 	return 0;