mm/highmem: simplify is_highmem()
[deliverable/linux.git] / include / linux / mmzone.h
index c60df9257cc7c751dedcdb46f7ffc06d63677703..150c6049f961407b82c75d5b7fe3bef0976f0993 100644 (file)
@@ -828,10 +828,7 @@ static inline int is_highmem_idx(enum zone_type idx)
 static inline int is_highmem(struct zone *zone)
 {
 #ifdef CONFIG_HIGHMEM
-       int zone_off = (char *)zone - (char *)zone->zone_pgdat->node_zones;
-       return zone_off == ZONE_HIGHMEM * sizeof(*zone) ||
-              (zone_off == ZONE_MOVABLE * sizeof(*zone) &&
-               zone_movable_is_highmem());
+       return is_highmem_idx(zone_idx(zone));
 #else
        return 0;
 #endif
This page took 0.02521 seconds and 5 git commands to generate.