From: Linus Torvalds <torvalds@g5.osdl.org>
Date: Tue, 16 Aug 2005 00:40:46 +0000 (-0700)
Subject: um: fix __pa/__va macro expansion problem
X-Git-Tag: v2.6.13-rc7~85
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=75cd968ab251ac84dd3a5dc252af7036dc4a64f4;p=linux-2.6-omap-h63xx.git

um: fix __pa/__va macro expansion problem

Proper parentheses around arguments needed, especially as the macros use
a high-precedence cast operator on the argument.
---

diff --git a/include/asm-um/page.h b/include/asm-um/page.h
index 5afee8a8cdf..f58aedadeb4 100644
--- a/include/asm-um/page.h
+++ b/include/asm-um/page.h
@@ -104,8 +104,8 @@ extern void *to_virt(unsigned long phys);
  * casting is the right thing, but 32-bit UML can't have 64-bit virtual
  * addresses
  */
-#define __pa(virt) to_phys((void *) (unsigned long) virt)
-#define __va(phys) to_virt((unsigned long) phys)
+#define __pa(virt) to_phys((void *) (unsigned long) (virt))
+#define __va(phys) to_virt((unsigned long) (phys))
 
 #define page_to_pfn(page) ((page) - mem_map)
 #define pfn_to_page(pfn) (mem_map + (pfn))