[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZqXdigYmtS27MxV4@kernel.org>
Date: Sun, 28 Jul 2024 08:56:26 +0300
From: Mike Rapoport <rppt@...nel.org>
To: Wei Yang <richard.weiyang@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 1/5] memblock test: fix implicit declaration of function
'virt_to_phys'
On Thu, Jul 25, 2024 at 01:41:53AM +0000, Wei Yang wrote:
> Commit 94ff46de4a73 ("memblock: Move late alloc warning down to phys
> alloc") introduce the usage of virt_to_phys(), which is not defined in
> memblock tests.
>
> Define it in kernel.h to fix the build error.
>
> Signed-off-by: Wei Yang <richard.weiyang@...il.com>
> ---
> tools/testing/memblock/linux/kernel.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/memblock/linux/kernel.h b/tools/testing/memblock/linux/kernel.h
> index d2f148bd8902..ca56f36ef296 100644
> --- a/tools/testing/memblock/linux/kernel.h
> +++ b/tools/testing/memblock/linux/kernel.h
> @@ -9,4 +9,6 @@
> #include <linux/linkage.h>
> #include <linux/kconfig.h>
>
> +#define virt_to_phys(p) ((unsigned long)p)
> +
There's already phys_to_virt() in tools/include/linux/mm.h.
It'd be better to put this one next to it.
> #endif
> --
> 2.34.1
>
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists