diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2012-05-29 18:06:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:23 -0400 |
commit | acc50c110cf6f1a8bd1af410b2c7bc29ca624678 (patch) | |
tree | a0efadad1426fdcec66e659466dc2f3c7ca63ea9 /mm/page_alloc.c | |
parent | be9cd873e2a706a688e37224d48e135efd8c0d26 (diff) |
mm: page_alloc: catch out-of-date list of page flag names
String tables with names of enum items are always prone to go out of
sync with the enums themselves. Ensure during compile time that the
name table of page flags has the same size as the page flags enum.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 72869ea5c513..5712898c951b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -5985,6 +5985,8 @@ static void dump_page_flags(unsigned long flags) | |||
5985 | unsigned long mask; | 5985 | unsigned long mask; |
5986 | int i; | 5986 | int i; |
5987 | 5987 | ||
5988 | BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) - 1 != __NR_PAGEFLAGS); | ||
5989 | |||
5988 | printk(KERN_ALERT "page flags: %#lx(", flags); | 5990 | printk(KERN_ALERT "page flags: %#lx(", flags); |
5989 | 5991 | ||
5990 | /* remove zone id */ | 5992 | /* remove zone id */ |