* [PATCH] mm: page_alloc: fix variable type in zonelist type iteration
@ 2015-12-08 14:03 Johannes Weiner
2015-12-08 21:56 ` David Rientjes
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Weiner @ 2015-12-08 14:03 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-mm, linux-kernel, kernel-team
/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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: page_alloc: fix variable type in zonelist type iteration
2015-12-08 14:03 [PATCH] mm: page_alloc: fix variable type in zonelist type iteration Johannes Weiner
@ 2015-12-08 21:56 ` David Rientjes
2015-12-09 14:41 ` Johannes Weiner
0 siblings, 1 reply; 3+ messages in thread
From: David Rientjes @ 2015-12-08 21:56 UTC (permalink / raw)
To: Johannes Weiner; +Cc: Andrew Morton, linux-mm, linux-kernel, kernel-team
[-- Attachment #1: Type: TEXT/PLAIN, Size: 634 bytes --]
On Tue, 8 Dec 2015, Johannes Weiner wrote:
> /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>
I think this is already handled by
http://marc.info/?l=linux-kernel&m=144901185732632.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: page_alloc: fix variable type in zonelist type iteration
2015-12-08 21:56 ` David Rientjes
@ 2015-12-09 14:41 ` Johannes Weiner
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Weiner @ 2015-12-09 14:41 UTC (permalink / raw)
To: David Rientjes; +Cc: Andrew Morton, linux-mm, linux-kernel, kernel-team
On Tue, Dec 08, 2015 at 01:56:42PM -0800, David Rientjes wrote:
> On Tue, 8 Dec 2015, Johannes Weiner wrote:
>
> > /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>
>
> I think this is already handled by
> http://marc.info/?l=linux-kernel&m=144901185732632.
Yup, it does. Thanks, David. Scratch this patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-09 14:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08 14:03 [PATCH] mm: page_alloc: fix variable type in zonelist type iteration Johannes Weiner
2015-12-08 21:56 ` David Rientjes
2015-12-09 14:41 ` Johannes Weiner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).