#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
*/
static inline int is_highmem(struct zone *zone)
{
- return (is_highmem_idx(zone - zone->zone_pgdat->node_zones));
+ return (zone - zone->zone_pgdat->node_zones == ZONE_HIGHMEM);
}
static inline int is_normal(struct zone *zone)
{
- return (is_normal_idx(zone - zone->zone_pgdat->node_zones));
+ return (zone - zone->zone_pgdat->node_zones == ZONE_NORMAL);
}
/* 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 *, loff_t *);
+ void __user *, size_t *);
int lower_zone_protection_sysctl_handler(struct ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
+ void __user *, size_t *);
#include <linux/topology.h>
/* Returns the number of the current Node. */