From: KOSAKI Motohiro Date: Mon, 28 Apr 2008 09:13:51 +0000 (-0700) Subject: cris: add constfy to pgd_offset() X-Git-Tag: v2.6.26-rc1~909 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=16a26ef5ad31b59c521bd9becccaee84c0157326;p=linux-2.6-omap-h63xx.git cris: add constfy to pgd_offset() add constfy to pgd_offset() for avoid following warnings. CC mm/pagewalk.o mm/pagewalk.c: In function 'walk_page_range': mm/pagewalk.c:111: warning: passing argument 1 of 'pgd_offset' discards qualifiers from p\ ointer target type Signed-off-by: KOSAKI Motohiro Cc: Matt Mackall Cc: "Vegard Nossum" Cc: Mikael Starvik Cc: Jesper Nilsson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-cris/pgtable.h b/include/asm-cris/pgtable.h index 4c373624ee9..829e7a7d9fb 100644 --- a/include/asm-cris/pgtable.h +++ b/include/asm-cris/pgtable.h @@ -231,7 +231,7 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) /* to find an entry in a page-table-directory */ -static inline pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address) +static inline pgd_t * pgd_offset(const struct mm_struct *mm, unsigned long address) { return mm->pgd + pgd_index(address); }