Commit 16a26ef5 authored by KOSAKI Motohiro's avatar KOSAKI Motohiro Committed by Linus Torvalds

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: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: "Vegard Nossum" <vegard.nossum@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5fd284fd
...@@ -231,7 +231,7 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) ...@@ -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)) #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
/* to find an entry in a page-table-directory */ /* 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); return mm->pgd + pgd_index(address);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment