linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Cheng <crquan@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: the memset operation on a automatic array variable can be removed by data Initialization
Date: Mon, 18 Jun 2007 00:43:44 -0700 (PDT)	[thread overview]
Message-ID: <467637b0.16be600a.377c.ffff8c04@mx.google.com> (raw)

Signed-Off-By: Denis Cheng <crquan@gmail.com>

--- arch/x86_64/mm/init.c	2007-06-07 10:08:04.000000000 +0800
+++ /tmp/init.c	2007-06-18 14:43:15.000000000 +0800
@@ -406,8 +406,7 @@ void __cpuinit zap_low_mappings(int cpu)
 #ifndef CONFIG_NUMA
 void __init paging_init(void)
 {
-	unsigned long max_zone_pfns[MAX_NR_ZONES];
-	memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
+	unsigned long max_zone_pfns[MAX_NR_ZONES] = { 0, };
 	max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
 	max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
 	max_zone_pfns[ZONE_NORMAL] = end_pfn;

             reply	other threads:[~2007-06-18  7:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-18  7:43 Denis Cheng [this message]
2007-06-18 11:42 ` the memset operation on a automatic array variable can be removed by data Initialization Jan Engelhardt
2007-06-18  7:47 Denis Cheng

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=467637b0.16be600a.377c.ffff8c04@mx.google.com \
    --to=crquan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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).