lkml.org 
[lkml]   [2023]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 7/7] asm-generic/io.h: Expect immutable pointer in virt_to_phys
On Thu, Apr 27, 2023 at 7:43 PM Stanislav Kinsburskii
<skinsburskii@linux.microsoft.com> wrote:

> From: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com>
>
> 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@gmail.com>
> CC: Arnd Bergmann <arnd@arndb.de>
> CC: linux-arch@vger.kernel.org
> CC: linux-kernel@vger.kernel.org

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

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

\
 
 \ /
  Last update: 2023-08-25 10:39    [W:0.133 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site