Messages in this thread | | | Date | Sat, 19 Apr 2008 21:13:00 +0400 | From | Dmitri Vorobiev <> | Subject | Re: [PATCH][trivial][2/2] cris: add constfy to pgd_offset() |
| |
KOSAKI Motohiro пишет: > 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 <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> > > --- > include/asm-cris/pgtable.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: b/include/asm-cris/pgtable.h > =================================================================== > --- a/include/asm-cris/pgtable.h 2008-04-19 19:25:50.000000000 +0900 > +++ b/include/asm-cris/pgtable.h 2008-04-19 19:27:31.000000000 +0900 > @@ -229,7 +229,7 @@ static inline void pmd_set(pmd_t * pmdp, > #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) ^ ^ I think that while at it, you could also delete these superfluous spaces after the asterisks thereby making the code conform to the kernel coding style.
Dmitri
> { > return mm->pgd + pgd_index(address); > } > > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ >
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |