From 9044576357b16d9ebbe10cc567277507d1165a54 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 7 Jul 2022 13:37:42 -0700 Subject: [PATCH] MIPS: Make phys_to_virt utilize __va() The implementation is exactly the same, so avoid open-coding it in two different locations. Signed-off-by: Florian Fainelli Reviewed-by: Serge Semin Signed-off-by: Thomas Bogendoerfer --- arch/mips/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 6f5c86d..880048a 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -131,7 +131,7 @@ static inline phys_addr_t virt_to_phys(const volatile void *x) */ static inline void * phys_to_virt(unsigned long address) { - return (void *)(address + PAGE_OFFSET - PHYS_OFFSET); + return __va(address); } /* -- 2.7.4