diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-08-17 08:45:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-17 16:00:20 -0400 |
commit | f991879473828f320a714e9494fb37a26ccd6b66 (patch) | |
tree | 349fee2f3c0d9b10340f2fbdb03fa63c2570dbfa | |
parent | 72ed62bdc46d76c965fb95aecb5d0bf97c976723 (diff) |
mm: make HASHED_PAGE_VIRTUAL page_address' struct page argument const.
Followup to 33dd4e0ec911 "mm: make some struct page's const" which missed the
HASHED_PAGE_VIRTUAL case.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/hash.h | 2 | ||||
-rw-r--r-- | include/linux/mm.h | 2 | ||||
-rw-r--r-- | mm/highmem.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/hash.h b/include/linux/hash.h index 06d25c189cc..b80506bdd73 100644 --- a/include/linux/hash.h +++ b/include/linux/hash.h | |||
@@ -63,7 +63,7 @@ static inline u32 hash_32(u32 val, unsigned int bits) | |||
63 | return hash >> (32 - bits); | 63 | return hash >> (32 - bits); |
64 | } | 64 | } |
65 | 65 | ||
66 | static inline unsigned long hash_ptr(void *ptr, unsigned int bits) | 66 | static inline unsigned long hash_ptr(const void *ptr, unsigned int bits) |
67 | { | 67 | { |
68 | return hash_long((unsigned long)ptr, bits); | 68 | return hash_long((unsigned long)ptr, bits); |
69 | } | 69 | } |
diff --git a/include/linux/mm.h b/include/linux/mm.h index fd599f4bb84..c06454d60a3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -737,7 +737,7 @@ static __always_inline void *lowmem_page_address(const struct page *page) | |||
737 | #endif | 737 | #endif |
738 | 738 | ||
739 | #if defined(HASHED_PAGE_VIRTUAL) | 739 | #if defined(HASHED_PAGE_VIRTUAL) |
740 | void *page_address(struct page *page); | 740 | void *page_address(const struct page *page); |
741 | void set_page_address(struct page *page, void *virtual); | 741 | void set_page_address(struct page *page, void *virtual); |
742 | void page_address_init(void); | 742 | void page_address_init(void); |
743 | #endif | 743 | #endif |
diff --git a/mm/highmem.c b/mm/highmem.c index 693394daa2e..5ef672c07f7 100644 --- a/mm/highmem.c +++ b/mm/highmem.c | |||
@@ -326,7 +326,7 @@ static struct page_address_slot { | |||
326 | spinlock_t lock; /* Protect this bucket's list */ | 326 | spinlock_t lock; /* Protect this bucket's list */ |
327 | } ____cacheline_aligned_in_smp page_address_htable[1<<PA_HASH_ORDER]; | 327 | } ____cacheline_aligned_in_smp page_address_htable[1<<PA_HASH_ORDER]; |
328 | 328 | ||
329 | static struct page_address_slot *page_slot(struct page *page) | 329 | static struct page_address_slot *page_slot(const struct page *page) |
330 | { | 330 | { |
331 | return &page_address_htable[hash_ptr(page, PA_HASH_ORDER)]; | 331 | return &page_address_htable[hash_ptr(page, PA_HASH_ORDER)]; |
332 | } | 332 | } |
@@ -337,7 +337,7 @@ static struct page_address_slot *page_slot(struct page *page) | |||
337 | * | 337 | * |
338 | * Returns the page's virtual address. | 338 | * Returns the page's virtual address. |
339 | */ | 339 | */ |
340 | void *page_address(struct page *page) | 340 | void *page_address(const struct page *page) |
341 | { | 341 | { |
342 | unsigned long flags; | 342 | unsigned long flags; |
343 | void *ret; | 343 | void *ret; |