cris: add constfy to pgd_offset()
authorKOSAKI Motohiro <[email protected]>
Mon, 28 Apr 2008 09:13:51 +0000 (02:13 -0700)
committerLinus Torvalds <[email protected]>
Mon, 28 Apr 2008 15:58:28 +0000 (08:58 -0700)
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 <[email protected]>
Cc: Matt Mackall <[email protected]>
Cc: "Vegard Nossum" <[email protected]>
Cc: Mikael Starvik <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/asm-cris/pgtable.h

index 4c373624ee97c644a85c5c16ad538f27777489cb..829e7a7d9fb9b7b75457337e178dc9a6e2591576 100644 (file)
@@ -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);
 }