[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1390066846.31367.538.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Sat, 18 Jan 2014 09:40:46 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] net: remove unnecessary initializations in net_dev_init
On Sat, 2014-01-18 at 16:04 +0100, Sabrina Dubroca wrote:
> softnet_data is set to 0 by memset, no need to initialize specific
> fields to 0 or NULL afterwards.
>
> Signed-off-by: Sabrina Dubroca <sd@...asysnail.net>
> ---
> net/core/dev.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 288df62..b57b44a2 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -7000,25 +7000,16 @@ static int __init net_dev_init(void)
> memset(sd, 0, sizeof(*sd));
Hi Sabrina
Well, if you really want, you also can remove this memset(), percpu data
defined as :
DEFINE_PER_CPU_ALIGNED(struct softnet_data, softnet_data);
must also be zero at boot time.
Thanks !
--
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