netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] net: remove unnecessary initializations in net_dev_init
Date: Sat, 18 Jan 2014 09:40:46 -0800	[thread overview]
Message-ID: <1390066846.31367.538.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <1390057451-30807-1-git-send-email-sd@queasysnail.net>

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@queasysnail.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 !

  reply	other threads:[~2014-01-18 17:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-18 15:04 [PATCH] net: remove unnecessary initializations in net_dev_init Sabrina Dubroca
2014-01-18 17:40 ` Eric Dumazet [this message]
2014-01-18 18:04   ` Sabrina Dubroca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1390066846.31367.538.camel@edumazet-glaptop2.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).