Subject: Re: CVS [email-masked]: linux

From: Thiemo Seufer <[email-masked]>
Date: Sat, 2 Apr 2005 12:11:36 +0200

[email-masked] wrote:
> 
> CVSROOT:	/home/cvs
> Module name:	linux
> Changes by:	[email-masked]	05/04/01 18:53:33
> 
> Modified files:
> 	arch/mips/mm   : pg-sb1.c 
> 
> Log message:
> 	Remove useless casts.  Fix formatting.

This patch leads for 64bit kernels to:

  CC      arch/mips/mm/pg-sb1.o
arch/mips/mm/pg-sb1.c: In function `sb1_dma_init':
arch/mips/mm/pg-sb1.c:220: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c:225: warning: passing arg 2 of `__raw_writeq' discards qualifiers from pointer target type
arch/mips/mm/pg-sb1.c:226: warning: passing arg 2 of `__raw_writeq' discards qualifiers from pointer target type
arch/mips/mm/pg-sb1.c:227: warning: passing arg 2 of `__raw_writeq' discards qualifiers from pointer target type
arch/mips/mm/pg-sb1.c: In function `clear_page':
arch/mips/mm/pg-sb1.c:233: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c:237: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c: In function `copy_page':
arch/mips/mm/pg-sb1.c:257: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c:258: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c:262: warning: cast from pointer to integer of different size
arch/mips/mm/pg-sb1.c:263: warning: cast from pointer to integer of different size

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Mon, 4 Apr 2005 12:26:38 +0100 (BST)

> arch/mips/mm/pg-sb1.c:227: warning: passing arg 2 of `__raw_writeq' discards qualifiers from pointer target type

 Thanks for pointing this out.  That "const" shouldn't be on "base_reg" 
there, of course.  I'm committing a fix right now.  My apologies for 
inadequate testing.

> arch/mips/mm/pg-sb1.c:263: warning: cast from pointer to integer of different size

 These are unrelated.  Essentially "CPHYSADDR(foo)" expands to 
"(int)(foo)" (that is, after having removed some unrelated bits) and it's 
not going to work in a portable way if "foo" is a pointer...  Thanks for 
your report though -- this code needs a rewrite for a proper 64-bit 
support and I'll try to have a look at it.

  Maciej