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...

[[email protected]: coding-style fixes]
Signed-off-by: Ian Campbell <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Michel Lespinasse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Ian Campbell authored and 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.