Re: [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes

2023-08-24 Thread Stanislav Kinsburskii
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


[PATCH 6/7] powerpc: asm/io.h: Expect immutable pointer in virt_to_phys prototype

2023-04-28 Thread Stanislav Kinsburskii
From: Stanislav Kinsburskii 

These helper function - virt_to_phys - doesn'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 
CC: Michael Ellerman 
CC: Nicholas Piggin 
CC: Christophe Leroy 
CC: Geert Uytterhoeven 
CC: Bjorn Helgaas 
CC: Stanislav Kinsburskii 
CC: Arnd Bergmann 
CC: linuxppc-dev@lists.ozlabs.org
CC: linux-ker...@vger.kernel.org
---
 arch/powerpc/include/asm/io.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index f1e657c9bbe8..c287eeb9536f 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -959,7 +959,7 @@ extern void __iomem *__ioremap_caller(phys_addr_t, unsigned 
long size,
  * almost all conceivable cases a device driver should not be using
  * this function
  */
-static inline unsigned long virt_to_phys(volatile void * address)
+static inline unsigned long virt_to_phys(const volatile void * address)
 {
WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && !virt_addr_valid(address));
 




[PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes

2023-04-28 Thread Stanislav Kinsburskii
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(-)