| To: | linux-mips@linux-mips.org, ralf@linux-mips.org |
|---|---|
| Subject: | [loongson-PATCH-v3 03/25] fix-warning: incompatible argument type of virt_to_phys |
| From: | wuzhangjin@gmail.com |
| Date: | Thu, 4 Jun 2009 21:00:19 +0800 |
| Cc: | Wu Zhangjin <wuzj@lemote.com>, Yan Hua <yanh@lemote.com>, Philippe Vachon <philippe@cowpig.ca>, Zhang Le <r0bertz@gentoo.org>, Zhang Fuxin <zhangfx@lemote.com>, loongson-dev <loongson-dev@googlegroups.com>, Liu Junliang <liujl@lemote.com>, Erwan Lerale <erwan@thiscow.com>, Wu Zhangjin <wuzhangjin@gmail.com> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=230mElEDum++8i0fzb0dYnFrkeSdyNZuydbhkNKPEXY=; b=P1u2P06laT0e1jVsgU1CI3V77cMBMj53J6pVefwHV5XlawX/P96o2XbB+8MK0/JRgT tPkmgAycGduCoUlx5QaKQTuYNUEwg5cipvh4GzO0geSRFgYB0x9ywnW7794Q/smChEpY xFUm97bAYdnb6crFXd5o6J8tvgOGlX0qp4FLw= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; b=XL/UvcSisagrAEr9FdOCXbeuq/7P1P5YqMCtCK8eRIu1J4L6fKVdd642xaPuK7vxEt j69bUbTwPcPlPq6EB0+j1Io84oSK5MhGnzma3nMiUcBZTxPtUX2lKdr251u+LOlC2Fmr JppMxIv5qdrG9et72GzvMMx6X+5W6YLtAiJ7Q= |
| In-reply-to: | <cover.1244120172.git.wuzj@lemote.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <cover.1244120172.git.wuzj@lemote.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
From: Wu Zhangjin <wuzj@lemote.com>
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 <wuzhangjin@gmail.com>
---
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 9f946e4..d148e87 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -179,8 +179,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.0.4
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [loongson-PATCH-v3 02/25] fix-warning: incompatible argument type of pci_fixup_irqs, wuzhangjin |
|---|---|
| Next by Date: | [loongson-PATCH-v3 05/25] remove reference to bonito64.h, wuzhangjin |
| Previous by Thread: | [loongson-PATCH-v3 02/25] fix-warning: incompatible argument type of pci_fixup_irqs, wuzhangjin |
| Next by Thread: | [loongson-PATCH-v3 05/25] remove reference to bonito64.h, wuzhangjin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |