diff options
author | Emil Medve <Emilian.Medve@freescale.com> | 2014-04-07 18:37:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:35:58 -0400 |
commit | 136199f0a67cd6bb3f0e8de0ad50f52879f82077 (patch) | |
tree | ac5d4244644aabe7435cc8922376ca14e3235b7b /mm/page_alloc.c | |
parent | ed6d7c8e578331cad594ee70d60e2e146b5dce7b (diff) |
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) | |||
5073 | nodemask_t saved_node_state = node_states[N_MEMORY]; | 5073 | nodemask_t saved_node_state = node_states[N_MEMORY]; |
5074 | unsigned long totalpages = early_calculate_totalpages(); | 5074 | unsigned long totalpages = early_calculate_totalpages(); |
5075 | int usable_nodes = nodes_weight(node_states[N_MEMORY]); | 5075 | int usable_nodes = nodes_weight(node_states[N_MEMORY]); |
5076 | struct memblock_type *type = &memblock.memory; | 5076 | struct memblock_region *r; |
5077 | 5077 | ||
5078 | /* Need to find movable_zone earlier when movable_node is specified. */ | 5078 | /* Need to find movable_zone earlier when movable_node is specified. */ |
5079 | find_usable_zone_for_movable(); | 5079 | find_usable_zone_for_movable(); |
@@ -5083,13 +5083,13 @@ static void __init find_zone_movable_pfns_for_nodes(void) | |||
5083 | * options. | 5083 | * options. |
5084 | */ | 5084 | */ |
5085 | if (movable_node_is_enabled()) { | 5085 | if (movable_node_is_enabled()) { |
5086 | for (i = 0; i < type->cnt; i++) { | 5086 | for_each_memblock(memory, r) { |
5087 | if (!memblock_is_hotpluggable(&type->regions[i])) | 5087 | if (!memblock_is_hotpluggable(r)) |
5088 | continue; | 5088 | continue; |
5089 | 5089 | ||
5090 | nid = type->regions[i].nid; | 5090 | nid = r->nid; |
5091 | 5091 | ||
5092 | usable_startpfn = PFN_DOWN(type->regions[i].base); | 5092 | usable_startpfn = PFN_DOWN(r->base); |
5093 | zone_movable_pfn[nid] = zone_movable_pfn[nid] ? | 5093 | zone_movable_pfn[nid] = zone_movable_pfn[nid] ? |
5094 | min(usable_startpfn, zone_movable_pfn[nid]) : | 5094 | min(usable_startpfn, zone_movable_pfn[nid]) : |
5095 | usable_startpfn; | 5095 | usable_startpfn; |