From: Andrew Morton Date: Thu, 16 Oct 2008 05:01:07 +0000 (-0700) Subject: mm/page_alloc.c:free_area_init_nodes() fix inappropriate use of enum X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=db99100d2ed40dd9736fcb1adb3657a98f9bcfd9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Frans Pop Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 27b8681139fd..9eb9eb928285 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -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();