From: Jesper Nilsson <Jesper.Nilsson@axis.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Vegard Nossum <vegard.nossum@gmail.com>,
Matt Mackall <mpm@selenic.com>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
dev-etrax <dev-etrax@axis.com>,
Mikael Starvik <mikael.starvik@axis.com>
Subject: Re: [PATCH][trivial][2/2] cris: add constfy to pgd_offset()
Date: Sun, 20 Apr 2008 00:07:14 +0200 [thread overview]
Message-ID: <20080419220714.GE3031@axis.com> (raw)
In-Reply-To: <20080419190710.A8F7.KOSAKI.MOTOHIRO@jp.fujitsu.com>
On Sat, Apr 19, 2008 at 12:09:25PM +0200, KOSAKI Motohiro wrote:
> 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)
> {
> return mm->pgd + pgd_index(address);
> }
Thanks, I've added the following to the CRIS-tree.
---
include/asm-cris/pgtable.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/asm-cris/pgtable.h b/include/asm-cris/pgtable.h
index a260757..a307ed6 100644
--- a/include/asm-cris/pgtable.h
+++ b/include/asm-cris/pgtable.h
@@ -229,7 +229,8 @@ 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);
}
--
1.5.4.2.133.g3d51e
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
prev parent reply other threads:[~2008-04-19 22:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-19 9:26 [PATCH][trivial] mm/pagewalk.c break const constraint KOSAKI Motohiro
2008-04-19 9:34 ` Vegard Nossum
2008-04-19 9:50 ` KOSAKI Motohiro
2008-04-19 10:04 ` [PATCH][trivial][0/2] mm/pagewalk.c break const constraint. take2 KOSAKI Motohiro
2008-04-19 10:07 ` [PATCH][trivial][1/2] ia64: add constfy to pgd_offset() KOSAKI Motohiro
2008-04-19 10:09 ` [PATCH][trivial][2/2] cris: " KOSAKI Motohiro
2008-04-19 17:13 ` Dmitri Vorobiev
2008-04-19 22:07 ` Jesper Nilsson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080419220714.GE3031@axis.com \
--to=jesper.nilsson@axis.com \
--cc=akpm@linux-foundation.org \
--cc=dev-etrax@axis.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikael.starvik@axis.com \
--cc=mpm@selenic.com \
--cc=torvalds@linux-foundation.org \
--cc=vegard.nossum@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).