[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZGzYpm/Vs+TfSBMR@liuwe-devbox-debian-v2>
Date: Tue, 23 May 2023 15:15:50 +0000
From: Wei Liu <wei.liu@...nel.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Wei Liu <wei.liu@...nel.org>, Paul Durrant <paul@....org>,
xen-devel@...ts.xenproject.org, netdev@...r.kernel.org
Subject: Re: [PATCH] xen/netback: Pass (void *) to virt_to_page()
On Tue, May 23, 2023 at 04:03:42PM +0200, Linus Walleij wrote:
> virt_to_page() takes a virtual address as argument but
> the driver passes an unsigned long, which works because
> the target platform(s) uses polymorphic macros to calculate
> the page.
>
> Since many architectures implement virt_to_pfn() as
> a macro, this function becomes polymorphic and accepts both a
> (unsigned long) and a (void *).
>
> Fix this up by an explicit (void *) cast.
>
> Cc: Wei Liu <wei.liu@...nel.org>
> Cc: Paul Durrant <paul@....org>
> Cc: xen-devel@...ts.xenproject.org
> Cc: netdev@...r.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
Acked-by: Wei Liu <wei.liu@...nel.org>
Powered by blists - more mailing lists