| To: | linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org> |
|---|---|
| Subject: | [loongson-PATCH-v1 02/27] fix-warning: incompatible argument type of virt_to_phys |
| From: | wuzhangjin@gmail.com |
| Date: | Thu, 21 May 2009 05:49:30 +0800 |
| Cc: | Wu Zhangjin <wuzhangjin@gmail.com>, Yan hua <yanh@lemote.com>, Philippe Vachon <philippe@cowpig.ca>, Zhang Le <r0bertz@gentoo.org>, Zhang Fuxin <zhangfx@lemote.com>, Arnaud Patard <apatard@mandriva.com>, loongson-dev@googlegroups.com, gnewsense-dev@nongnu.org, Nicholas Mc Guire <hofrat@hofr.at>, Liu Junliang <liujl@lemote.com>, Erwan Lerale <erwan@thiscow.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=zD3WymBm4fRS34QwdE8ZMoGcBWsyZRkrTQe8dCBtabo=; b=pveHPXd/IJn1wLQrgkX5WgzDWejLIHqeeNrfqCra/u1zfZ2UwlzTDpZ1nmKcbV4fGs avyCeyA1HusyNzeuaPlcSshUpjuF1NR1aYCO0iAuvnw2vqs1WJve79/q9qLnCYJ2Vno3 MLxfUFI1UUd2Nj828MQ1XNSgeVLRgfLSxuAgk= |
| 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=NQaY6WA8ED9w97auTPINK3LV+lw3LXtrcI2iaYZR6jhZgo8hpDqNltWOz15XZCIngY uKqh6kx6dpNGZdvreFBc5e5EVthqt+sYC7Fd7ZXKFl/nDxK/+Hu1+VUr3rPt+kiz0yuK 4hmjgrkSeqWZz5KxGKCgj9YumnnZGyMl/f9JM= |
| In-reply-to: | <cover.1242855716.git.wuzhangjin@gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <cover.1242855716.git.wuzhangjin@gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
From: Wu Zhangjin <wuzhangjin@gmail.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 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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [loongson-PATCH-v1 01/27] fix-warning: incompatible argument type of pci_fixup_irqs, wuzhangjin |
|---|---|
| Next by Date: | [loongson-PATCH-v1 03/27] fix-error: incompatiable argument type of clear_user, wuzhangjin |
| Previous by Thread: | Re: [loongson-PATCH-v1 01/27] fix-warning: incompatible argument type of pci_fixup_irqs, Ralf Baechle |
| Next by Thread: | Re: [loongson-PATCH-v1 02/27] fix-warning: incompatible argument type of virt_to_phys, Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |