lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080419220714.GE3031@axis.com>
Date:	Sun, 20 Apr 2008 00:07:14 +0200
From:	Jesper Nilsson <Jesper.Nilsson@...s.com>
To:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc:	Vegard Nossum <vegard.nossum@...il.com>,
	Matt Mackall <mpm@...enic.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	dev-etrax <dev-etrax@...s.com>,
	Mikael Starvik <mikael.starvik@...s.com>
Subject: Re: [PATCH][trivial][2/2] cris: add constfy to pgd_offset()

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@...fujitsu.com>
> CC: Matt Mackall <mpm@...enic.com>
> CC: "Vegard Nossum" <vegard.nossum@...il.com>
> CC: Mikael Starvik <starvik@...s.com>
> CC: Jesper Nilsson <jesper.nilsson@...s.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@...s.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ