From c453d5fe6785ea03fb56018214d42123764ac59c Mon Sep 17 00:00:00 2001 From: William Lee Irwin III Date: Sun, 2 Jun 2002 22:34:11 -0700 Subject: [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. --- include/linux/mmzone.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/linux') 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 -- cgit v1.2.3