Re: [PATCH] fix sparse warning from include/linux/mmzone.h

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Harvey Harrison <harvey.harrison@...>, <viro@...>, <linux-kernel@...>, <mingo@...>
Date: Friday, February 8, 2008 - 6:04 pm

On Fri, 8 Feb 2008, Andrew Morton wrote:

Heh, yeah. That's a very odd way to write it.

It would probably make more sense to just write it as something like

	struct zone *base = zone->zone_pgdat->node_zones;

	if (zone == base + ZONE_HIGHMEM ||
		(zone == base + ZONE_MOVABLE && zone_movable_is_highmem());

instead.

The above is totally untested, of course.

		Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] fix sparse warning from include/linux/mmzone.h, Harvey Harrison, (Thu Feb 7, 4:52 pm)
Re: [PATCH] fix sparse warning from include/linux/mmzone.h, Linus Torvalds, (Fri Feb 8, 6:04 pm)
Re: [PATCH] fix sparse warning from include/linux/mmzone.h, Harvey Harrison, (Fri Feb 8, 6:38 pm)
Re: [PATCH] fix sparse warning from include/linux/mmzone.h, Harvey Harrison, (Wed Feb 13, 3:56 pm)
[PATCH] remove sparse warning for mmzone.h, Harvey Harrison, (Wed Feb 13, 4:36 pm)
Re: [PATCH] fix sparse warning from include/linux/mmzone.h, Harvey Harrison, (Fri Feb 8, 6:17 pm)