Commit c453d5fe authored by William Lee Irwin III's avatar William Lee Irwin III Committed by Linus Torvalds

[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.
parent 2b227acb
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment