[<prev] [next>] [day] [month] [year] [list]
Message-ID: <467654d2.14da600a.3067.ffffbc11@mx.google.com>
Date: Mon, 18 Jun 2007 02:48:02 -0700 (PDT)
From: Denis Cheng <crquan@...il.com>
To: trivial@...nel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] the memset operation on a automatic array variable
should be optimized out by data initialization
Is there some comments on this?
Signed-Off-By: Denis Cheng <crquan@...il.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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists