[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnewsense-dev] [loongson-PATCH-v1 02/27] fix-warning: incompatible argu
From: |
wuzhangjin |
Subject: |
[Gnewsense-dev] [loongson-PATCH-v1 02/27] fix-warning: incompatible argument type of virt_to_phys |
Date: |
Thu, 21 May 2009 05:49:30 +0800 |
From: Wu Zhangjin <address@hidden>
mm/page_alloc.c:1760: warning: passing argument 1 of ‘virt_to_phys’
makes pointer from integer without a cast
mm/page_alloc.c:1760
...
unsigned long addr;
...
split_page(virt_to_page(addr), order);
arch/mips/include/asm/page.h
#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
#define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr)))
arch/mips/include/asm/io.h
static inline unsigned long virt_to_phys(volatile const void *address)
Signed-off-by: Wu Zhangjin <address@hidden>
---
arch/mips/include/asm/page.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index fe7a88e..ee37e58 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -176,8 +176,9 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#endif
-#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
-#define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr)))
+#define virt_to_page(kaddr) \
+ pfn_to_page(PFN_DOWN(virt_to_phys((void *)kaddr)))
+#define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys((void *)kaddr)))
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
--
1.6.2.1
- [Gnewsense-dev] [loongson-PATCH-v1 00/27] linux patches of loongson-based machines, wuzhangjin, 2009/05/21
- [Gnewsense-dev] [loongson-PATCH-v1 01/27] fix-warning: incompatible argument type of pci_fixup_irqs, wuzhangjin, 2009/05/21
- Message not available
- Message not available
- [Gnewsense-dev] [loongson-PATCH-v1 02/27] fix-warning: incompatible argument type of virt_to_phys,
wuzhangjin <=
- [Gnewsense-dev] [loongson-PATCH-v1 04/27] change the naming methods, wuzhangjin, 2009/05/21
- [Gnewsense-dev] [loongson-PATCH-v1 03/27] fix-error: incompatiable argument type of clear_user, wuzhangjin, 2009/05/21
- [Gnewsense-dev] [loongson-PATCH-v1 05/27] remove reference to bonito64.h, wuzhangjin, 2009/05/21
- [Gnewsense-dev] [loongson-PATCH-v1 09/27] enable Real Time Clock Support for fuloong(2e), wuzhangjin, 2009/05/21
- [Gnewsense-dev] [loongson-PATCH-v1 06/27] divide the files to the smallest logic unit, wuzhangjin, 2009/05/21
- [Gnewsense-dev] [loongson-PATCH-v1 08/27] clean up the early printk support for fuloong(2e), wuzhangjin, 2009/05/21
- [Gnewsense-dev] [loongson-PATCH-v1 07/27] replace tons of magic numbers by understandable symbols, wuzhangjin, 2009/05/21
- [Gnewsense-dev] [loongson-PATCH-v1 10/27] add loongson-specific cpu-feature-overrides.h, wuzhangjin, 2009/05/21