From: Ian Campbell Date: Tue, 26 Jul 2011 00:11:52 +0000 (-0700) Subject: mm: use const struct page for r/o page-flag accessor methods X-Git-Tag: v3.1-rc1~241^2~117 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67db392d1124e14684e23deb572de2a63b9b3b69;p=platform%2Fkernel%2Flinux-stable.git mm: use const struct page for r/o page-flag accessor methods In a subsquent patch I have a const struct page in my hand... [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Ian Campbell Cc: Andrea Arcangeli Cc: Rik van Riel Cc: Martin Schwidefsky Cc: Michel Lespinasse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 6081493..3e5a1b1 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -135,7 +135,7 @@ enum pageflags { * Macros to create function definitions for page flags */ #define TESTPAGEFLAG(uname, lname) \ -static inline int Page##uname(struct page *page) \ +static inline int Page##uname(const struct page *page) \ { return test_bit(PG_##lname, &page->flags); } #define SETPAGEFLAG(uname, lname) \ @@ -173,7 +173,7 @@ static inline int __TestClearPage##uname(struct page *page) \ __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname) #define PAGEFLAG_FALSE(uname) \ -static inline int Page##uname(struct page *page) \ +static inline int Page##uname(const struct page *page) \ { return 0; } #define TESTSCFLAG(uname, lname) \