linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] the memset operation on a automatic array variable should be optimized out by data initialization
@ 2007-06-18  9:48 Denis Cheng
  0 siblings, 0 replies; only message in thread
From: Denis Cheng @ 2007-06-18  9:48 UTC (permalink / raw)
  To: trivial; +Cc: linux-kernel

Is there some comments on this?

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

--

--- arch/x86_64/mm/init.c.orig	2007-06-07 10:08:04.000000000 +0800
+++ arch/x86_64/mm/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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-18  9:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-18  9:48 [PATCH] the memset operation on a automatic array variable should be optimized out by data initialization Denis Cheng

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).