From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] asm: align virt_to_phys definitions
Date: Mon, 12 Jun 2023 14:59:17 +0200 [thread overview]
Message-ID: <20230612125917.1087470-1-a.fatoum@pengutronix.de> (raw)
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(-)
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
next reply other threads:[~2023-06-12 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 12:59 Ahmad Fatoum [this message]
2023-06-13 8:37 ` Sascha Hauer
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=20230612125917.1087470-1-a.fatoum@pengutronix.de \
--to=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