From: Geert Uytterhoeven Make input parameters const where possible. Signed-off-by: Geert Uytterhoeven Signed-off-by: Andrew Morton --- 25-akpm/include/linux/mm.h | 12 ++++++------ 25-akpm/include/linux/mmzone.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff -puN include/linux/mm.h~linux-mmzoneh-const include/linux/mm.h --- 25/include/linux/mm.h~linux-mmzoneh-const 2004-07-26 17:29:17.261866584 -0700 +++ 25-akpm/include/linux/mm.h 2004-07-26 17:29:17.267865672 -0700 @@ -373,11 +373,11 @@ static inline void put_page(struct page #define NODEZONE_SHIFT (sizeof(page_flags_t)*8 - MAX_NODES_SHIFT - MAX_ZONES_SHIFT) #define NODEZONE(node, zone) ((node << ZONES_SHIFT) | zone) -static inline unsigned long page_zonenum(struct page *page) +static inline unsigned long page_zonenum(const struct page *page) { return (page->flags >> NODEZONE_SHIFT) & (~(~0UL << ZONES_SHIFT)); } -static inline unsigned long page_to_nid(struct page *page) +static inline unsigned long page_to_nid(const struct page *page) { return (page->flags >> (NODEZONE_SHIFT + ZONES_SHIFT)); } @@ -385,7 +385,7 @@ static inline unsigned long page_to_nid( struct zone; extern struct zone *zone_table[]; -static inline struct zone *page_zone(struct page *page) +static inline struct zone *page_zone(const struct page *page) { return zone_table[page->flags >> NODEZONE_SHIFT]; } @@ -401,7 +401,7 @@ static inline void set_page_zone(struct extern struct page *mem_map; #endif -static inline void *lowmem_page_address(struct page *page) +static inline void *lowmem_page_address(const struct page *page) { return __va(page_to_pfn(page) << PAGE_SHIFT); } @@ -455,7 +455,7 @@ static inline struct address_space *page * Return the pagecache index of the passed page. Regular pagecache pages * use ->index whereas swapcache pages use ->private */ -static inline pgoff_t page_index(struct page *page) +static inline pgoff_t page_index(const struct page *page) { if (unlikely(PageSwapCache(page))) return page->private; @@ -465,7 +465,7 @@ static inline pgoff_t page_index(struct /* * Return true if this page is mapped into pagetables. */ -static inline int page_mapped(struct page *page) +static inline int page_mapped(const struct page *page) { return page->mapcount != 0; } diff -puN include/linux/mmzone.h~linux-mmzoneh-const include/linux/mmzone.h --- 25/include/linux/mmzone.h~linux-mmzoneh-const 2004-07-26 17:29:17.263866280 -0700 +++ 25-akpm/include/linux/mmzone.h 2004-07-26 17:30:08.298107896 -0700 @@ -348,12 +348,12 @@ static inline int is_normal_idx(int idx) * to ZONE_{DMA/NORMAL/HIGHMEM/etc} in general code to a minimum. * @zone - pointer to struct zone variable */ -static inline int is_highmem(struct zone *zone) +static inline int is_highmem(const struct zone *zone) { return (is_highmem_idx(zone - zone->zone_pgdat->node_zones)); } -static inline int is_normal(struct zone *zone) +static inline int is_normal(const struct zone *zone) { return (is_normal_idx(zone - zone->zone_pgdat->node_zones)); } _