Commit 75cd968a authored by Linus Torvalds's avatar Linus Torvalds

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.
parent 3edea483
...@@ -104,8 +104,8 @@ extern void *to_virt(unsigned long phys); ...@@ -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 * casting is the right thing, but 32-bit UML can't have 64-bit virtual
* addresses * addresses
*/ */
#define __pa(virt) to_phys((void *) (unsigned long) virt) #define __pa(virt) to_phys((void *) (unsigned long) (virt))
#define __va(phys) to_virt((unsigned long) phys) #define __va(phys) to_virt((unsigned long) (phys))
#define page_to_pfn(page) ((page) - mem_map) #define page_to_pfn(page) ((page) - mem_map)
#define pfn_to_page(pfn) (mem_map + (pfn)) #define pfn_to_page(pfn) (mem_map + (pfn))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment