提交 db99100d 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

mm/page_alloc.c:free_area_init_nodes() fix inappropriate use of enum

Local variable `i' is a) misleadingly-named for an `enum zone_type' and b)
used for indexing zones as well as nodes as well as node_maps.

Make it an `int'.
Reported-by: NFrans Pop <elendil@planet.nl>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 9363b9f2
......@@ -3952,7 +3952,7 @@ static void check_for_regular_memory(pg_data_t *pgdat)
void __init free_area_init_nodes(unsigned long *max_zone_pfn)
{
unsigned long nid;
enum zone_type i;
int i;
/* Sort early_node_map as initialisation assumes it is sorted */
sort_node_map();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册