Skip to content

Commit

Permalink
mm/page_alloc.c:free_area_init_nodes() fix inappropriate use of enum
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Mel Gorman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed Oct 16, 2008
1 parent 9363b9f commit db99100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit db99100

Please sign in to comment.