Merge to Fedora Core 2 kernel-2.6.8-1.521
[linux-2.6.git] / include / linux / mmzone.h
index 2560131..e2f19aa 100644 (file)
@@ -341,6 +341,15 @@ static inline struct zone *next_zone(struct zone *zone)
 #define for_each_zone(zone) \
        for (zone = pgdat_list->node_zones; zone; zone = next_zone(zone))
 
+static inline int is_highmem_idx(int idx)
+{
+       return (idx == ZONE_HIGHMEM);
+}
+
+static inline int is_normal_idx(int idx)
+{
+       return (idx == ZONE_NORMAL);
+}
 /**
  * is_highmem - helper function to quickly check if a struct zone is a 
  *              highmem zone or not.  This is an attempt to keep references
@@ -349,21 +358,21 @@ static inline struct zone *next_zone(struct zone *zone)
  */
 static inline int is_highmem(struct zone *zone)
 {
-       return (zone - zone->zone_pgdat->node_zones == ZONE_HIGHMEM);
+       return (is_highmem_idx(zone - zone->zone_pgdat->node_zones));
 }
 
 static inline int is_normal(struct zone *zone)
 {
-       return (zone - zone->zone_pgdat->node_zones == ZONE_NORMAL);
+       return (is_normal_idx(zone - zone->zone_pgdat->node_zones));
 }
 
 /* These two functions are used to setup the per zone pages min values */
 struct ctl_table;
 struct file;
 int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, 
-                                       void __user *, size_t *);
+                                       void __user *, size_t *, loff_t *);
 int lower_zone_protection_sysctl_handler(struct ctl_table *, int, struct file *,
-                                       void __user *, size_t *);
+                                       void __user *, size_t *, loff_t *);
 
 #include <linux/topology.h>
 /* Returns the number of the current Node. */