Commit 67db392d authored by Ian Campbell's avatar Ian Campbell Committed by Linus Torvalds

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: default avatarIan Campbell <ian.campbell@citrix.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 33dd4e0e
...@@ -135,7 +135,7 @@ enum pageflags { ...@@ -135,7 +135,7 @@ enum pageflags {
* Macros to create function definitions for page flags * Macros to create function definitions for page flags
*/ */
#define TESTPAGEFLAG(uname, lname) \ #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); } { return test_bit(PG_##lname, &page->flags); }
#define SETPAGEFLAG(uname, lname) \ #define SETPAGEFLAG(uname, lname) \
...@@ -173,7 +173,7 @@ static inline int __TestClearPage##uname(struct page *page) \ ...@@ -173,7 +173,7 @@ static inline int __TestClearPage##uname(struct page *page) \
__SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname) __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname)
#define PAGEFLAG_FALSE(uname) \ #define PAGEFLAG_FALSE(uname) \
static inline int Page##uname(struct page *page) \ static inline int Page##uname(const struct page *page) \
{ return 0; } { return 0; }
#define TESTSCFLAG(uname, lname) \ #define TESTSCFLAG(uname, lname) \
......
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