From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] asm: align virt_to_phys definitions
Date: Tue, 13 Jun 2023 10:37:57 +0200 [thread overview]
Message-ID: <20230613083757.GQ18491@pengutronix.de> (raw)
In-Reply-To: <20230612125917.1087470-1-a.fatoum@pengutronix.de>
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@pengutronix.de>
> ---
> 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 |
prev parent reply other threads:[~2023-06-13 8:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 12:59 Ahmad Fatoum
2023-06-13 8:37 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230613083757.GQ18491@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox