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

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Ian Campbell and committed by
Linus Torvalds
f9918794 72ed62bd

+4 -4
+1 -1
include/linux/hash.h
··· 63 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 68 return hash_long((unsigned long)ptr, bits); 69 69 }
+1 -1
include/linux/mm.h
··· 737 737 #endif 738 738 739 739 #if defined(HASHED_PAGE_VIRTUAL) 740 - void *page_address(struct page *page); 740 + void *page_address(const struct page *page); 741 741 void set_page_address(struct page *page, void *virtual); 742 742 void page_address_init(void); 743 743 #endif
+2 -2
mm/highmem.c
··· 326 326 spinlock_t lock; /* Protect this bucket's list */ 327 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 331 return &page_address_htable[hash_ptr(page, PA_HASH_ORDER)]; 332 332 } ··· 337 337 * 338 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 342 unsigned long flags; 343 343 void *ret;