* [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes
@ 2023-04-15 11:17 Stanislav Kinsburskii
2023-04-15 11:17 ` [PATCH 2/7] alpha: asm/io.h: " Stanislav Kinsburskii
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Stanislav Kinsburskii @ 2023-04-15 11:17 UTC (permalink / raw)
Cc: Matt Turner, x86, Stanislav Kinsburskii, Borislav Petkov,
linux-ia64, Mark Brown, Richard Henderson, linux-kernel,
Brian Cain, linux-mips, Geert Uytterhoeven, linux-alpha,
linux-arch, Michael Ellerman, Linus Walleij, Jiaxun Yang,
Bjorn Helgaas, Andrew Morton, Dave Hansen, Omar Sandoval,
Helge Deller, linuxppc-dev
This series is aimed to address compilation warnings when a constant pointer
is passed to virt_to_phys and isa_virt_to_bus functions:
warning: passing argument 1 of ‘virt_to_phys’ discards ‘const’ qualifier from pointer target type
warning: passing argument 1 of ‘isa_virt_to_bus’ discards ‘const’ qualifier from pointer target type
The change(s) is the same for all architectures, but it's split into a series on
per-arch basis to simplify applying and testing on the maintainers side.
The following series implements...
---
Stanislav Kinsburskii (7):
x86: asm/io.h: Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes
alpha: asm/io.h: Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes
mips: asm/io.h: Expect immutable pointer in isa_virt_to_bus prototype
hexagon: asm/io.h: Expect immutable pointer in virt_to_phys prototype
ia64: asm/io.h: Expect immutable pointer in virt_to_phys prototype
powerpc: asm/io.h: Expect immutable pointer in virt_to_phys prototype
asm-generic/io.h: Expect immutable pointer in virt_to_phys
arch/alpha/include/asm/io.h | 6 +++---
arch/hexagon/include/asm/io.h | 2 +-
arch/ia64/include/asm/io.h | 2 +-
arch/mips/include/asm/io.h | 2 +-
arch/powerpc/include/asm/io.h | 2 +-
arch/x86/include/asm/io.h | 4 ++--
include/asm-generic/io.h | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/7] alpha: asm/io.h: Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes
2023-04-15 11:17 [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes Stanislav Kinsburskii
@ 2023-04-15 11:17 ` Stanislav Kinsburskii
2023-04-28 7:40 ` [PATCH 0/7] " Arnd Bergmann
2023-05-03 7:32 ` Linus Walleij
2 siblings, 0 replies; 6+ messages in thread
From: Stanislav Kinsburskii @ 2023-04-15 11:17 UTC (permalink / raw)
Cc: Stanislav Kinsburskii, Richard Henderson, Ivan Kokshaysky,
Matt Turner, Arnd Bergmann, Geert Uytterhoeven, Linus Walleij,
Stanislav Kinsburskii, Michael Ellerman, Bjorn Helgaas,
linux-alpha, linux-kernel
From: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.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@gmail.com>
CC: Richard Henderson <richard.henderson@linaro.org>
CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
CC: Matt Turner <mattst88@gmail.com>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Geert Uytterhoeven <geert@linux-m68k.org>
CC: Linus Walleij <linus.walleij@linaro.org>
CC: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com>
CC: Michael Ellerman <mpe@ellerman.id.au>
CC: Bjorn Helgaas <bhelgaas@google.com>
CC: linux-alpha@vger.kernel.org
CC: linux-kernel@vger.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;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes
2023-04-15 11:17 [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes Stanislav Kinsburskii
2023-04-15 11:17 ` [PATCH 2/7] alpha: asm/io.h: " Stanislav Kinsburskii
@ 2023-04-28 7:40 ` Arnd Bergmann
2023-08-22 21:26 ` Stanislav Kinsburskii
2023-08-22 21:26 ` Stanislav Kinsburskii
2023-05-03 7:32 ` Linus Walleij
2 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2023-04-28 7:40 UTC (permalink / raw)
To: Stanislav Kinsburskii
Cc: linux-ia64, Linus Walleij, Dave Hansen, Jiaxun Yang, linux-mips,
H. Peter Anvin, linux-hexagon, Omar Sandoval, Linux-Arch,
Florian Fainelli, Helge Deller, x86, Stanislav Kinsburskii,
Ingo Molnar, Geert Uytterhoeven, Matt Turner, Richard Henderson,
Nicholas Piggin, Mark Brown, Borislav Petkov, Bjorn Helgaas,
Thomas Gleixner, Brian Cain, Thomas Bogendoerfer,
Chris Down <chr>
On Sat, Apr 15, 2023, at 12:17, Stanislav Kinsburskii wrote:
> This series is aimed to address compilation warnings when a constant pointer
> is passed to virt_to_phys and isa_virt_to_bus functions:
>
> warning: passing argument 1 of ‘virt_to_phys’ discards ‘const’
> qualifier from pointer target type
> warning: passing argument 1 of ‘isa_virt_to_bus’ discards ‘const’
> qualifier from pointer target type
>
> The change(s) is the same for all architectures, but it's split into a series on
> per-arch basis to simplify applying and testing on the maintainers side.
>
Looks all good to me. If everyone is happy with it, I'll queue it up
after in the asm-generic tree for 6.5, once rc1 is out.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes
2023-04-15 11:17 [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes Stanislav Kinsburskii
2023-04-15 11:17 ` [PATCH 2/7] alpha: asm/io.h: " Stanislav Kinsburskii
2023-04-28 7:40 ` [PATCH 0/7] " Arnd Bergmann
@ 2023-05-03 7:32 ` Linus Walleij
2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2023-05-03 7:32 UTC (permalink / raw)
To: Stanislav Kinsburskii
Cc: linux-ia64, Dave Hansen, Jiaxun Yang, linux-mips, H. Peter Anvin,
Omar Sandoval, linux-arch, Florian Fainelli, Helge Deller, x86,
Stanislav Kinsburskii, Ingo Molnar, Geert Uytterhoeven,
Matt Turner, Arnd Bergmann, linux-alpha, Richard Henderson,
Nicholas Piggin, Mark Brown, Borislav Petkov, Bjorn Helgaas,
Thomas Gleixner, Brian Cain, c.com, , Thomas Bogendoerfer,
Chris Down, linux-
On Thu, Apr 27, 2023 at 7:41 PM Stanislav Kinsburskii
<skinsburskii@linux.microsoft.com> wrote:
> This series is aimed to address compilation warnings when a constant pointer
> is passed to virt_to_phys and isa_virt_to_bus functions:
>
> warning: passing argument 1 of ‘virt_to_phys’ discards ‘const’ qualifier from pointer target type
> warning: passing argument 1 of ‘isa_virt_to_bus’ discards ‘const’ qualifier from pointer target type
>
> The change(s) is the same for all architectures, but it's split into a series on
> per-arch basis to simplify applying and testing on the maintainers side.
>
> The following series implements...
This is nice.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
I am working with an adjacent task, which is to make virt_to_pfn() and
pfn_to_virt() into static inlines. I might need to rebase my work on top
of this but it should be doable, I am currently stressing the buildbots
with this with the idea to propose it to Arnd once v6.4-rc1 is out:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git/log/?h=b4/virt-to-pfn-v6-4-rc1
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes
2023-04-28 7:40 ` [PATCH 0/7] " Arnd Bergmann
2023-08-22 21:26 ` Stanislav Kinsburskii
@ 2023-08-22 21:26 ` Stanislav Kinsburskii
1 sibling, 0 replies; 6+ messages in thread
From: Stanislav Kinsburskii @ 2023-08-22 21:26 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-ia64, Linus Walleij, Dave Hansen, Jiaxun Yang, linux-mips,
H. Peter Anvin, linux-hexagon, Omar Sandoval, Linux-Arch,
Florian Fainelli, Helge Deller, x86, Stanislav Kinsburskii,
Ingo Molnar, Geert Uytterhoeven, Matt Turner, Richard Henderson,
Nicholas Piggin, Mark Brown, Borislav Petkov, Bjorn Helgaas,
Thomas Gleixner, Brian Cain, Thomas Bogendoerfer,
Chris Down <chr>
On Fri, Apr 28, 2023 at 08:40:51AM +0100, Arnd Bergmann wrote:
> On Sat, Apr 15, 2023, at 12:17, Stanislav Kinsburskii wrote:
> > This series is aimed to address compilation warnings when a constant pointer
> > is passed to virt_to_phys and isa_virt_to_bus functions:
> >
> > warning: passing argument 1 of ‘virt_to_phys’ discards ‘const’
> > qualifier from pointer target type
> > warning: passing argument 1 of ‘isa_virt_to_bus’ discards ‘const’
> > qualifier from pointer target type
> >
> > The change(s) is the same for all architectures, but it's split into a series on
> > per-arch basis to simplify applying and testing on the maintainers side.
> >
>
> Looks all good to me. If everyone is happy with it, I'll queue it up
> after in the asm-generic tree for 6.5, once rc1 is out.
>
Hello Arnd,
Is the plan to merge this series into 6.5 still on?
Stanislav
> Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes
2023-04-28 7:40 ` [PATCH 0/7] " Arnd Bergmann
@ 2023-08-22 21:26 ` Stanislav Kinsburskii
2023-08-22 21:26 ` Stanislav Kinsburskii
1 sibling, 0 replies; 6+ messages in thread
From: Stanislav Kinsburskii @ 2023-08-22 21:26 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-ia64, Linus Walleij, Dave Hansen, Jiaxun Yang, linux-mips,
H. Peter Anvin, linux-hexagon, Omar Sandoval, Linux-Arch,
Florian Fainelli, Helge Deller, x86, Stanislav Kinsburskii,
Ingo Molnar, Geert Uytterhoeven, Matt Turner, Richard Henderson,
Nicholas Piggin, Mark Brown, Borislav Petkov, Bjorn Helgaas,
Thomas Gleixner, Brian Cain, Thomas Bogendoerfer,
Chris Down <chr>
On Fri, Apr 28, 2023 at 08:40:51AM +0100, Arnd Bergmann wrote:
> On Sat, Apr 15, 2023, at 12:17, Stanislav Kinsburskii wrote:
> > This series is aimed to address compilation warnings when a constant pointer
> > is passed to virt_to_phys and isa_virt_to_bus functions:
> >
> > warning: passing argument 1 of ‘virt_to_phys’ discards ‘const’
> > qualifier from pointer target type
> > warning: passing argument 1 of ‘isa_virt_to_bus’ discards ‘const’
> > qualifier from pointer target type
> >
> > The change(s) is the same for all architectures, but it's split into a series on
> > per-arch basis to simplify applying and testing on the maintainers side.
> >
>
> Looks all good to me. If everyone is happy with it, I'll queue it up
> after in the asm-generic tree for 6.5, once rc1 is out.
>
Hello Arnd,
Is the plan to merge this series into 6.5 still on?
Stanislav
> Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-08-22 21:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-15 11:17 [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes Stanislav Kinsburskii
2023-04-15 11:17 ` [PATCH 2/7] alpha: asm/io.h: " Stanislav Kinsburskii
2023-04-28 7:40 ` [PATCH 0/7] " Arnd Bergmann
2023-08-22 21:26 ` Stanislav Kinsburskii
2023-08-22 21:26 ` Stanislav Kinsburskii
2023-05-03 7:32 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox