[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <168155745118.13678.3878958755096151716.stgit@skinsburskii.localdomain>
Date: Sat, 15 Apr 2023 04:17:31 -0700
From: Stanislav Kinsburskii <skinsburskii@...ux.microsoft.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>,
Richard Henderson <richard.henderson@...aro.org>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Linus Walleij <linus.walleij@...aro.org>,
Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>,
Michael Ellerman <mpe@...erman.id.au>,
Bjorn Helgaas <bhelgaas@...gle.com>,
linux-alpha@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/7] alpha: asm/io.h: Expect immutable pointer in
virt_to_phys/isa_virt_to_bus prototypes
From: Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>
These two helper functions - virt_to_phys and isa_virt_to_bus - don't need the
address pointer to be mutable.
In the same time expecting it to be mutable leads to the following build
warning for constant pointers:
warning: passing argument 1 of ‘virt_to_phys’ discards ‘const’ qualifier from pointer target type
Signed-off-by: Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>
CC: Richard Henderson <richard.henderson@...aro.org>
CC: Ivan Kokshaysky <ink@...assic.park.msu.ru>
CC: Matt Turner <mattst88@...il.com>
CC: Arnd Bergmann <arnd@...db.de>
CC: Geert Uytterhoeven <geert@...ux-m68k.org>
CC: Linus Walleij <linus.walleij@...aro.org>
CC: Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>
CC: Michael Ellerman <mpe@...erman.id.au>
CC: Bjorn Helgaas <bhelgaas@...gle.com>
CC: linux-alpha@...r.kernel.org
CC: linux-kernel@...r.kernel.org
---
arch/alpha/include/asm/io.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h
index 7aeaf7c30a6f..0e2016537bd3 100644
--- a/arch/alpha/include/asm/io.h
+++ b/arch/alpha/include/asm/io.h
@@ -56,7 +56,7 @@ extern inline void set_hae(unsigned long new_hae)
* Change virtual addresses to physical addresses and vv.
*/
#ifdef USE_48_BIT_KSEG
-static inline unsigned long virt_to_phys(volatile void *address)
+static inline unsigned long virt_to_phys(const volatile void *address)
{
return (unsigned long)address - IDENT_ADDR;
}
@@ -66,7 +66,7 @@ static inline void * phys_to_virt(unsigned long address)
return (void *) (address + IDENT_ADDR);
}
#else
-static inline unsigned long virt_to_phys(volatile void *address)
+static inline unsigned long virt_to_phys(const volatile void *address)
{
unsigned long phys = (unsigned long)address;
@@ -104,7 +104,7 @@ static inline void * phys_to_virt(unsigned long address)
extern unsigned long __direct_map_base;
extern unsigned long __direct_map_size;
-static inline unsigned long __deprecated isa_virt_to_bus(volatile void *address)
+static inline unsigned long __deprecated isa_virt_to_bus(const volatile void *address)
{
unsigned long phys = virt_to_phys(address);
unsigned long bus = phys + __direct_map_base;
Powered by blists - more mailing lists