Zero out zones_size with memset() and initialize just the zones
we need. This should avoid breakage when zones come and go.
Signed-off-by: Haavard Skinnemoen <[email protected]>
---
arch/avr32/mm/init.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c
index 0cb82de..7bbbd7e 100644
--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -380,7 +380,7 @@ void __init paging_init(void)
for_each_online_node(nid) {
pg_data_t *pgdat = NODE_DATA(nid);
- unsigned long zones_size[MAX_NR_ZONES] = { 0, 0, 0 };
+ unsigned long zones_size[MAX_NR_ZONES];
unsigned long low, start_pfn;
start_pfn = pgdat->bdata->node_boot_start;
@@ -388,8 +388,8 @@ void __init paging_init(void)
low = pgdat->bdata->node_low_pfn;
/* All memory is DMA-able */
+ memset(zones_size, 0, sizeof(zones_size));
zones_size[ZONE_DMA] = low - start_pfn;
- zones_size[ZONE_NORMAL] = 0;
printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n",
nid, start_pfn, low);
--
1.4.0
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]