diff options
author | Emil Medve <Emilian.Medve@freescale.com> | 2014-04-07 15:37:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 16:35:58 -0700 |
commit | 136199f0a67cd6bb3f0e8de0ad50f52879f82077 (patch) | |
tree | ac5d4244644aabe7435cc8922376ca14e3235b7b /mm/page_alloc.c | |
parent | ed6d7c8e578331cad594ee70d60e2e146b5dce7b (diff) | |
download | blackbird-obmc-linux-136199f0a67cd6bb3f0e8de0ad50f52879f82077.tar.gz blackbird-obmc-linux-136199f0a67cd6bb3f0e8de0ad50f52879f82077.zip |
memblock: use for_each_memblock()
This is a small cleanup.
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 15d140755e71..48427a7cfb45 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5073,7 +5073,7 @@ static void __init find_zone_movable_pfns_for_nodes(void) nodemask_t saved_node_state = node_states[N_MEMORY]; unsigned long totalpages = early_calculate_totalpages(); int usable_nodes = nodes_weight(node_states[N_MEMORY]); - struct memblock_type *type = &memblock.memory; + struct memblock_region *r; /* Need to find movable_zone earlier when movable_node is specified. */ find_usable_zone_for_movable(); @@ -5083,13 +5083,13 @@ static void __init find_zone_movable_pfns_for_nodes(void) * options. */ if (movable_node_is_enabled()) { - for (i = 0; i < type->cnt; i++) { - if (!memblock_is_hotpluggable(&type->regions[i])) + for_each_memblock(memory, r) { + if (!memblock_is_hotpluggable(r)) continue; - nid = type->regions[i].nid; + nid = r->nid; - usable_startpfn = PFN_DOWN(type->regions[i].base); + usable_startpfn = PFN_DOWN(r->base); zone_movable_pfn[nid] = zone_movable_pfn[nid] ? min(usable_startpfn, zone_movable_pfn[nid]) : usable_startpfn; |