[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <46C13FC3.2020706@garzik.org>
Date: Tue, 14 Aug 2007 01:38:11 -0400
From: Jeff Garzik <jeff@...zik.org>
To: akpm@...ux-foundation.org
CC: netdev@...r.kernel.org, m.kozlowski@...land.pl
Subject: Re: [patch 15/18] drivers/net: remove superfluous memset
akpm@...ux-foundation.org wrote:
> From: Mariusz Kozlowski <m.kozlowski@...land.pl>
>
> This patch covers something like this:
>
> dev = alloc_*dev(...
> ...
> priv = netdev_priv(dev);
> memset(priv, 0, sizeof(*priv));
>
> The memset() here is superfluous. alloc_netdev() uses kzalloc()
> to allocate needed memory so there is no need to zero the priv region
> twice.
>
> Signed-off-by: Mariusz Kozlowski <m.kozlowski@...land.pl>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
>
> drivers/net/fs_enet/fs_enet-main.c | 1 -
> drivers/net/myri10ge/myri10ge.c | 1 -
> drivers/net/netxen/netxen_nic_main.c | 1 -
> drivers/net/sunlance.c | 1 -
> drivers/net/usb/pegasus.c | 1 -
> drivers/net/usb/rtl8150.c | 1 -
> 6 files changed, 6 deletions(-)
applied
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists