Re: [PATCH] asm: align virt_to_phys definitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 12, 2023 at 02:59:17PM +0200, Ahmad Fatoum wrote:
> 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(-)

Applied, thanks

Sascha

> 
> 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
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux