netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] bna: Remove unnecessary memset(,0,)
       [not found] <6f6d4a7a705949a3464471f364f77215f1e796f3.1294867098.git.joe@perches.com>
@ 2011-01-12 21:21 ` Joe Perches
  2011-01-12 22:55   ` Rasesh Mody
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2011-01-12 21:21 UTC (permalink / raw)
  To: Rasesh Mody, Debashis Dutt; +Cc: netdev, linux-kernel

kzalloc'd memory doesn't need a memset to 0.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/net/bna/bnad_ethtool.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bna/bnad_ethtool.c b/drivers/net/bna/bnad_ethtool.c
index 99be5ae..142d604 100644
--- a/drivers/net/bna/bnad_ethtool.c
+++ b/drivers/net/bna/bnad_ethtool.c
@@ -275,7 +275,6 @@ bnad_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
 
 	ioc_attr = kzalloc(sizeof(*ioc_attr), GFP_KERNEL);
 	if (ioc_attr) {
-		memset(ioc_attr, 0, sizeof(*ioc_attr));
 		spin_lock_irqsave(&bnad->bna_lock, flags);
 		bfa_nw_ioc_get_attr(&bnad->bna.device.ioc, ioc_attr);
 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
-- 
1.7.3.3.398.g0b0cd.dirty

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

* RE: [PATCH 2/3] bna: Remove unnecessary memset(,0,)
  2011-01-12 21:21 ` [PATCH 2/3] bna: Remove unnecessary memset(,0,) Joe Perches
@ 2011-01-12 22:55   ` Rasesh Mody
  2011-01-13  3:01     ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Rasesh Mody @ 2011-01-12 22:55 UTC (permalink / raw)
  To: Joe Perches, Debashis Dutt
  Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org


>From: Joe Perches [mailto:joe@perches.com]
>Sent: Wednesday, January 12, 2011 1:21 PM
>
>kzalloc'd memory doesn't need a memset to 0.
>
>Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: Rasesh Mody <rmody@brocade.com>

>---
> drivers/net/bna/bnad_ethtool.c |    1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/net/bna/bnad_ethtool.c
>b/drivers/net/bna/bnad_ethtool.c
>index 99be5ae..142d604 100644
>--- a/drivers/net/bna/bnad_ethtool.c
>+++ b/drivers/net/bna/bnad_ethtool.c
>@@ -275,7 +275,6 @@ bnad_get_drvinfo(struct net_device *netdev, struct
>ethtool_drvinfo *drvinfo)
>
> 	ioc_attr = kzalloc(sizeof(*ioc_attr), GFP_KERNEL);
> 	if (ioc_attr) {
>-		memset(ioc_attr, 0, sizeof(*ioc_attr));
> 		spin_lock_irqsave(&bnad->bna_lock, flags);
> 		bfa_nw_ioc_get_attr(&bnad->bna.device.ioc, ioc_attr);
> 		spin_unlock_irqrestore(&bnad->bna_lock, flags);
>--
>1.7.3.3.398.g0b0cd.dirty

Joe,
Patch looks ok to me.
Thanks,
Rasesh

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

* Re: [PATCH 2/3] bna: Remove unnecessary memset(,0,)
  2011-01-12 22:55   ` Rasesh Mody
@ 2011-01-13  3:01     ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-01-13  3:01 UTC (permalink / raw)
  To: rmody; +Cc: joe, ddutt, netdev, linux-kernel

From: Rasesh Mody <rmody@brocade.com>
Date: Wed, 12 Jan 2011 14:55:25 -0800

> 
>>From: Joe Perches [mailto:joe@perches.com]
>>Sent: Wednesday, January 12, 2011 1:21 PM
>>
>>kzalloc'd memory doesn't need a memset to 0.
>>
>>Signed-off-by: Joe Perches <joe@perches.com>
> 
> Acked-by: Rasesh Mody <rmody@brocade.com>

Applied.

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

end of thread, other threads:[~2011-01-13  3:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <6f6d4a7a705949a3464471f364f77215f1e796f3.1294867098.git.joe@perches.com>
2011-01-12 21:21 ` [PATCH 2/3] bna: Remove unnecessary memset(,0,) Joe Perches
2011-01-12 22:55   ` Rasesh Mody
2011-01-13  3:01     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).