MIPS: Drop virt_to_phys define to self

Message ID 20230808-virt-to-phys-mips-v1-1-af6fcd45ed31@linaro.org
State New
Headers
Series MIPS: Drop virt_to_phys define to self |

Commit Message

Linus Walleij Aug. 8, 2023, 9:29 a.m. UTC
  The function virt_to_phys was defined to virt_to_phys and then
implemented right below.

I can't understand why, just drop it and let the actual function
slot in.

Fixes: dfad83cb7193 ("MIPS: Add support for CONFIG_DEBUG_VIRTUAL")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/mips/include/asm/io.h | 1 -
 1 file changed, 1 deletion(-)


---
base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
change-id: 20230808-virt-to-phys-mips-226e409a84a7

Best regards,
  

Comments

Linus Walleij Aug. 8, 2023, 8:05 p.m. UTC | #1
On Tue, Aug 8, 2023 at 3:46 PM Arnd Bergmann <arnd@arndb.de> wrote:
> On Tue, Aug 8, 2023, at 15:12, Linus Walleij wrote:

> > Normally you would do this so as to override the default virt_to_phys()
> > from include/asm-generic/io.h, but we do not seem to be using it here?
>
> Correct. In linux-next, we have converted arch/sh to use
> include/asm-generic/io.h, so arch/mips is now the last one
> to not use it.
>
> I see that Jiaxun Yang posted a patch for this in May and it looked
> like it should finally work [1], but there seems to still be something
> missing.

Oh that's a nice patch!

> For the moment, I'd suggest we leave the #define in place
> here in order to finish the patch that starts using the
> asm-generic header, and then we can look into using more
> of the generic code.

Sure, no point in causing stir with Jiaxun's work, let's drop
this patch.

Yours,
Linus Walleij
  

Patch

diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
index affd21e9c20b..18ed44843541 100644
--- a/arch/mips/include/asm/io.h
+++ b/arch/mips/include/asm/io.h
@@ -111,7 +111,6 @@  extern phys_addr_t __virt_to_phys(volatile const void *x);
 #define __virt_to_phys(x)	__virt_to_phys_nodebug(x)
 #endif
 
-#define virt_to_phys virt_to_phys
 static inline phys_addr_t virt_to_phys(const volatile void *x)
 {
 	return __virt_to_phys(x);