Re: [PATCH 7/7] asm-generic/io.h: Expect immutable pointer in virt_to_phys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 27, 2023 at 7:43 PM Stanislav Kinsburskii
<skinsburskii@xxxxxxxxxxxxxxxxxxx> wrote:

> From: Stanislav Kinsburskii <stanislav.kinsburskii@xxxxxxxxx>
>
> 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 <stanislav.kinsburskii@xxxxxxxxx>
> CC: Arnd Bergmann <arnd@xxxxxxxx>
> CC: linux-arch@xxxxxxxxxxxxxxx
> CC: linux-kernel@xxxxxxxxxxxxxxx

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

I changed several other virt_to_phys() implementations to add const to
the argument and no problems so this should work fine.

Yours,
Linus Walleij




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux