All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: page.h: define virt_to_pfn()
@ 2017-03-09 21:11 Florian Fainelli
  2017-11-08 23:15   ` James Hogan
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2017-03-09 21:11 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf, james.hogan, paul.burton, macro, Florian Fainelli

Based on the existing definition of virt_to_page() which already does a
PFN_DOWN(vir_to_phys(kaddr)).

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/mips/include/asm/page.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index 5f987598054f..ad461216b5a1 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -240,8 +240,8 @@ static inline int pfn_valid(unsigned long pfn)
 
 #endif
 
-#define virt_to_page(kaddr)	pfn_to_page(PFN_DOWN(virt_to_phys((void *)     \
-								  (kaddr))))
+#define virt_to_pfn(kaddr)   	PFN_DOWN(virt_to_phys((void *)(kaddr)))
+#define virt_to_page(kaddr)	pfn_to_page(virt_to_pfn(kaddr))
 
 extern int __virt_addr_valid(const volatile void *kaddr);
 #define virt_addr_valid(kaddr)						\
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-09 15:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09 21:11 [PATCH] MIPS: page.h: define virt_to_pfn() Florian Fainelli
2017-11-08 23:15 ` James Hogan
2017-11-08 23:15   ` James Hogan
2017-11-09  0:05   ` Florian Fainelli
2017-11-09 15:43     ` James Hogan
2017-11-09 15:43       ` James Hogan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.