mbox series

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

Message ID 168155718437.13678.714141668943813263.stgit@skinsburskii.localdomain (mailing list archive)
Headers show
Series Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes | expand

Message

Stanislav Kinsburskii April 15, 2023, 11:17 a.m. UTC
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(-)

Comments

Linus Walleij May 3, 2023, 7:32 a.m. UTC | #1
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
Stanislav Kinsburskii Aug. 22, 2023, 9:26 p.m. UTC | #2
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
Michael Ellerman Oct. 27, 2023, 9:59 a.m. UTC | #3
On Sat, 15 Apr 2023 04:17:19 -0700, 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.
> 
> [...]

Patch 6 applied to powerpc/next.

[6/7] powerpc: asm/io.h: Expect immutable pointer in virt_to_phys prototype
      https://git.kernel.org/powerpc/c/b28d1ccf921a4333be14017d82066386d419e638

cheers