summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWilliam Lee Irwin III <wli@holomorphy.com>2002-06-02 22:34:11 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-06-02 22:34:11 -0700
commitc453d5fe6785ea03fb56018214d42123764ac59c (patch)
tree0840453fdbaf968fd0ab4e35de51c68f9875eef2 /include
parent2b227acb3a573d41becca26f84168adf9becd77d (diff)
[PATCH] make memclass() an inline
memclass is too large to be a #define; it overflows 80 columns and does not make use of facilities available only to macros. This patch convert memclass() to be an inline function.
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmzone.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index d571870bef32..7b3557e39d45 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -142,8 +142,14 @@ typedef struct pglist_data {
extern int numnodes;
extern pg_data_t *pgdat_list;
-#define memclass(pgzone, classzone) (((pgzone)->zone_pgdat == (classzone)->zone_pgdat) \
- && ((pgzone) <= (classzone)))
+static inline int memclass(zone_t *pgzone, zone_t *classzone)
+{
+ if (pgzone->zone_pgdat != classzone->zone_pgdat)
+ return 0;
+ if (pgzone > classzone)
+ return 0;
+ return 1;
+}
/*
* The following two are not meant for general usage. They are here as