Skip to content

Commit

Permalink
MIPS: Make phys_to_virt utilize __va()
Browse files Browse the repository at this point in the history
The implementation is exactly the same, so avoid open-coding it in two
different locations.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
  • Loading branch information
Florian Fainelli authored and Thomas Bogendoerfer committed Jul 11, 2022
1 parent 8baa651 commit 9044576
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit 9044576

Please sign in to comment.