public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.13-rc7 compile failures (was: Re: Fix up mmap of /dev/kmem)
Date: Wed, 24 Aug 2005 17:36:21 +0200	[thread overview]
Message-ID: <jeacj7l53e.fsf@sykes.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.63.0508241410530.4356@anakin> (Geert Uytterhoeven's message of "Wed, 24 Aug 2005 14:12:46 +0200 (CEST)")

Geert Uytterhoeven <geert@linux-m68k.org> 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 <schwab@suse.de>

--- 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, schwab@suse.de
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."

      reply	other threads:[~2005-08-24 15:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200508132201.j7DM1TAN031499@hera.kernel.org>
2005-08-15 13:04 ` Fix up mmap of /dev/kmem Olaf Hering
2005-08-24 12:12 ` 2.6.13-rc7 compile failures (was: Re: Fix up mmap of /dev/kmem) Geert Uytterhoeven
2005-08-24 15:36   ` Andreas Schwab [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=jeacj7l53e.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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