Re: 2.6.13-rc7 compile failures (was: Re: Fix up mmap of /dev/kmem)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Geert Uytterhoeven <[email protected]> writes:

> Some (not all!) of my m68k test builds are now failing with:
>
> | linux-m68k-2.6.13-rc7/drivers/char/mem.c: In function `mmap_kmem':
> | linux-m68k-2.6.13-rc7/drivers/char/mem.c:267: warning: cast to pointer from integer of different size
> | linux-m68k-2.6.13-rc7/drivers/char/mem.c:267: invalid operands to binary <<

Try this:

Add parens around macro parameters.

Signed-off-by: Andreas Schwab <[email protected]>

--- include/asm-m68k/page.h.~1.14.~	2004-05-26 20:10:15.000000000 +0200
+++ include/asm-m68k/page.h	2005-08-24 17:29:55.000000000 +0200
@@ -138,13 +138,13 @@ extern unsigned long m68k_memoffset;
 #define __pa(vaddr)		((unsigned long)(vaddr)+m68k_memoffset)
 #define __va(paddr)		((void *)((unsigned long)(paddr)-m68k_memoffset))
 #else
-#define __pa(vaddr)		virt_to_phys((void *)vaddr)
-#define __va(paddr)		phys_to_virt((unsigned long)paddr)
+#define __pa(vaddr)		virt_to_phys((void *)(vaddr))
+#define __va(paddr)		phys_to_virt((unsigned long)(paddr))
 #endif
 
 #else	/* !CONFIG_SUN3 */
 /* This #define is a horrible hack to suppress lots of warnings. --m */
-#define __pa(x) ___pa((unsigned long)x)
+#define __pa(x) ___pa((unsigned long)(x))
 static inline unsigned long ___pa(unsigned long x)
 {
      if(x == 0)

Andreas.

-- 
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux