Skip to content

Commit

Permalink
mm: use const struct page for r/o page-flag accessor methods
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ian Campbell authored and Linus Torvalds committed Jul 26, 2011
1 parent 33dd4e0 commit 67db392
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/page-flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down Expand Up @@ -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) \
Expand Down

0 comments on commit 67db392

Please sign in to comment.