lkml.org 
[lkml]   [2015]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm: page_alloc: fix variable type in zonelist type iteration
Date
/home/hannes/src/linux/linux/mm/page_alloc.c: In function ‘build_zonelists’:
/home/hannes/src/linux/linux/mm/page_alloc.c:4171:16: warning: comparison between ‘enum zone_type’ and ‘enum <anonymous>’ [-Wenum-compare]
for (i = 0; i < MAX_ZONELISTS; i++) {
^

MAX_ZONELISTS has never been of enum zone_type, probably gcc only
recently started including -Wenum-compare in -Wall.

Make i a simple int.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
mm/page_alloc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d06a7d0..d5f291b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4160,8 +4160,7 @@ static void set_zonelist_order(void)

static void build_zonelists(pg_data_t *pgdat)
{
- int j, node, load;
- enum zone_type i;
+ int i, j, node, load;
nodemask_t used_mask;
int local_node, prev_node;
struct zonelist *zonelist;
--
2.6.3


\
 
 \ /
  Last update: 2015-12-08 15:21    [W:0.071 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site