Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ian Campbell and committed by
Linus Torvalds
67db392d 33dd4e0e

+2 -2
+2 -2
include/linux/page-flags.h
··· 135 135 * Macros to create function definitions for page flags 136 136 */ 137 137 #define TESTPAGEFLAG(uname, lname) \ 138 - static inline int Page##uname(struct page *page) \ 138 + static inline int Page##uname(const struct page *page) \ 139 139 { return test_bit(PG_##lname, &page->flags); } 140 140 141 141 #define SETPAGEFLAG(uname, lname) \ ··· 173 173 __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname) 174 174 175 175 #define PAGEFLAG_FALSE(uname) \ 176 - static inline int Page##uname(struct page *page) \ 176 + static inline int Page##uname(const struct page *page) \ 177 177 { return 0; } 178 178 179 179 #define TESTSCFLAG(uname, lname) \