Thread (13 messages) 13 messages, 2 authors, 2011-07-22
STALE5433d

[PATCH 02/13] mm: use const struct page for r/o page-flag accessor methods

From: Ian Campbell <hidden>
Date: 2011-07-22 13:17:45
Also in: linux-nfs, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

In a subsquent patch I have a const struct page in my hand...

Signed-off-by: Ian Campbell <redacted>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrea Arcangeli <redacted>
Cc: Rik van Riel <redacted>
Cc: Martin Schwidefsky <redacted>
Cc: Michel Lespinasse <redacted>
Cc: linux-kernel@vger.kernel.org
---
 include/linux/page-flags.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 6081493..7d632cc 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)					\
-- 
1.7.2.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help