Re: [PATCH 1/7] x86: asm/io.h: Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes
From: Linus Walleij
Date: Fri Aug 25 2023 - 04:40:30 EST
On Thu, Apr 27, 2023 at 7:42 PM Stanislav Kinsburskii
<skinsburskii@xxxxxxxxxxxxxxxxxxx> wrote:
> From: Stanislav Kinsburskii <stanislav.kinsburskii@xxxxxxxxx>
>
> 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@xxxxxxxxx>
> CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> CC: Ingo Molnar <mingo@xxxxxxxxxx>
> CC: Borislav Petkov <bp@xxxxxxxxx>
> CC: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
> CC: x86@xxxxxxxxxx
> CC: "H. Peter Anvin" <hpa@xxxxxxxxx>
> CC: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> CC: Arnd Bergmann <arnd@xxxxxxxx>
> CC: Chris Down <chris@xxxxxxxxxxxxxx>
> CC: Helge Deller <deller@xxxxxx>
> CC: Omar Sandoval <osandov@xxxxxx>
> CC: linux-kernel@xxxxxxxxxxxxxxx
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
This is the right thing to do.
Yours,
Linus Walleij