We have two definitions of virt_to_phys: One for MIPS code accepting both const and non-const pointers and one for everybody else that accepts volatile and non-volatile pointers. Unify both to have a common definition with the superset of the qualifiers. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- arch/mips/include/asm/io.h | 2 +- include/asm-generic/io.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 9c856c7b1552..4584eec8ca07 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -28,7 +28,7 @@ void dma_inv_range(unsigned long, unsigned long); * the memory address given. */ #define virt_to_phys virt_to_phys -static inline unsigned long virt_to_phys(const void *address) +static inline unsigned long virt_to_phys(const volatile void *address) { return CPHYSADDR((unsigned long)address); } diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 6e91c0aea68f..ab439026928a 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -769,7 +769,7 @@ static inline void iowrite64_rep(volatile void __iomem *addr, */ #ifndef virt_to_phys #define virt_to_phys virt_to_phys -static inline unsigned long virt_to_phys(volatile void *mem) +static inline unsigned long virt_to_phys(const volatile void *mem) { return (unsigned long)mem; } -- 2.39.2