]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
include-linux-mmzoneh-cleanups-fix
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 26 Mar 2013 23:24:47 +0000 (10:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Apr 2013 07:29:13 +0000 (18:29 +1100)
use zone_idx() some more, further simplify is_highmem()

Cc: Lin Feng <linfeng@cn.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mmzone.h

index 280cb6cf3ffa357dc6961185219e8181dbc16c0a..8c9f859ab55875421832492e38d4a1c972bf766a 100644 (file)
@@ -859,25 +859,18 @@ static inline int is_normal_idx(enum zone_type idx)
  */
 static inline int is_highmem(struct zone *zone)
 {
-#ifdef CONFIG_HIGHMEM
-       enum zone_type idx = zone_idx(zone);
-
-       return idx == ZONE_HIGHMEM ||
-              (idx == ZONE_MOVABLE && zone_movable_is_highmem());
-#else
-       return 0;
-#endif
+       return is_highmem_idx(zone_idx(zone));
 }
 
 static inline int is_normal(struct zone *zone)
 {
-       return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL;
+       return zone_idx(zone) == ZONE_NORMAL;
 }
 
 static inline int is_dma32(struct zone *zone)
 {
 #ifdef CONFIG_ZONE_DMA32
-       return zone == zone->zone_pgdat->node_zones + ZONE_DMA32;
+       return zone_idx(zone) == ZONE_DMA32;
 #else
        return 0;
 #endif
@@ -886,7 +879,7 @@ static inline int is_dma32(struct zone *zone)
 static inline int is_dma(struct zone *zone)
 {
 #ifdef CONFIG_ZONE_DMA
-       return zone == zone->zone_pgdat->node_zones + ZONE_DMA;
+       return zone_idx(zone) == ZONE_DMA;
 #else
        return 0;
 #endif