mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Haavard Skinnemoen <hskinnemoen@atmel.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, Haavard Skinnemoen <hskinnemoen@atmel.com>
Subject: [PATCH 2/6] AVR32: Don't assume anything about MAX_NR_ZONES
Date: Mon, 31 Jul 2006 15:55:56 +0200	[thread overview]
Message-ID: <11543541601753-git-send-email-hskinnemoen@atmel.com> (raw)
In-Reply-To: <1154354160566-git-send-email-hskinnemoen@atmel.com>

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 <hskinnemoen@atmel.com>
---
 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


  reply	other threads:[~2006-07-31 13:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-31 13:55 [PATCH 1/6] AVR32: Use auto.conf instead of MARKER Haavard Skinnemoen
2006-07-31 13:55 ` Haavard Skinnemoen [this message]
2006-07-31 13:55   ` [PATCH 3/6] AVR32: Add nsproxy definition Haavard Skinnemoen
2006-07-31 13:55     ` [PATCH 4/6] AVR32: Add I/O port access primitives Haavard Skinnemoen
2006-07-31 13:55       ` [PATCH 5/6] AVR32: Use linux/pfn.h Haavard Skinnemoen
2006-07-31 13:56         ` [PATCH 6/6] AVR32: Kill CONFIG_DISCONTIGMEM support completely Haavard Skinnemoen

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=11543541601753-git-send-email-hskinnemoen@atmel.com \
    --to=hskinnemoen@atmel.com \
    --cc=akpm@osdl.org \
    --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

all inboxes | Powered by JetHome®