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

From: Ingo Molnar
Date: Fri Feb 08 2008 - 17:27:37 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> 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.

missing closing parenthesis ;-)

btw., doesnt this look even nicer?:

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

[ i guess it must be Friday... ;-) ]

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/