Skip to contentSkip to conversation

mips: Fix compilation warning

PATCH New EUNBONG SONG 1 participant 1 message May 20, 2013 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips: Fix compilation warning

Fix the following compilation warning:

mm/page_alloc.c: In function 'free_reserved_area':
mm/page_alloc.c:5162: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast /home/ebsong/backup/linux_git/linux/arch/mips/include/asm/io.h:119: note: expected 'const volatile void *' but argument is of type 'long unsigned int'

---
 arch/mips/include/asm/page.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/include/asm/page.h +1 -1
index ec1ca53..41640f1 100644
@@ -197,7 +197,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
 
 #endif
 
-#define virt_to_page(kaddr)	pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
+#define virt_to_page(kaddr)	pfn_to_page(PFN_DOWN(virt_to_phys((const volatile void *)(kaddr))))
 
 extern int __virt_addr_valid(const volatile void *kaddr);
 #define virt_addr_valid(kaddr)						\
Signature · 1 line
1.7.0.4