public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik•org>
To: akpm@linux-foundation•org
Cc: netdev@vger•kernel.org, m.kozlowski@tuxland•pl
Subject: Re: [patch 15/18] drivers/net: remove superfluous memset
Date: Tue, 14 Aug 2007 01:38:11 -0400	[thread overview]
Message-ID: <46C13FC3.2020706@garzik.org> (raw)
In-Reply-To: <200708102105.l7AL5PRA008989@imap1.linux-foundation.org>

akpm@linux-foundation•org wrote:
> From: Mariusz Kozlowski <m.kozlowski@tuxland•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@tuxland•pl>
> Signed-off-by: Andrew Morton <akpm@linux-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



      reply	other threads:[~2007-08-14  5:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 21:05 [patch 15/18] drivers/net: remove superfluous memset akpm
2007-08-14  5:38 ` Jeff Garzik [this message]

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=46C13FC3.2020706@garzik.org \
    --to=jeff@garzik$(echo .)org \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=m.kozlowski@tuxland$(echo .)pl \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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