mm: numa,memblock: include <asm/numa.h> for 'numa_nodes_parsed'
PATCH 1/1 mm: numa,memblock: include <asm/numa.h> for 'numa_nodes_parsed'
The 'numa_nodes_parsed' is defined in <asm/numa.h> but this file is not included in mm/numa_memblks.c (build x86_64) so add this to the incldues to fix the following sparse warning:
mm/numa_memblks.c:13:12: warning: symbol 'numa_nodes_parsed' was not declared. Should it be static?
--- mm/numa_memblks.c | 2 ++ 1 file changed, 2 insertions(+)
mm/numa_memblks.c +2 -0
@@ -7,6 +7,8 @@#include <linux/numa.h> #include <linux/numa_memblks.h> +#include <asm/numa.h> +int numa_distance_cnt;static u8 *numa_distance;
Signature · 1 line
2.37.2.352.g3c44437643
Andrew Morton
maintainerQuoted 6 lines · On Thu, 8 Jan 2026 10:15:39 +0000 Ben Dooks <[email protected]> wrote:
The '
numa_nodes_parsed' is defined in <asm/numa.h> but this file is not included inmm/numa_memblks.c(buildx86_64) so add this to the incldues to fix the following sparse warning:
mm/numa_memblks.c:13:12: warning: symbol 'numa_nodes_parsed' was not declared. Should it be static?
huh, I wonder how that snuck through and survived more than a year.
Thanks, I'll add
Quoted 11 lines · Andrew Morton
Quoted 6 lines · On Thu, 8 Jan 2026 10:15:39 +0000 Ben Dooks <[email protected]> wrote:
The '
numa_nodes_parsed' is defined in <asm/numa.h> but this file is not included inmm/numa_memblks.c(buildx86_64) so add this to the incldues to fix the following sparse warning:
mm/numa_memblks.c:13:12: warning: symbol 'numa_nodes_parsed' was not declared. Should it be static?huh, I wonder how that snuck through and survived more than a year.
Probably most configs include <asm/numa.h> as other header dependencies and Ben's config does not for some reason.
Quoted 4 lines
Thanks, I'll add
Fixes 87482708210f ("mm: introduce numa_memblks")Cc <[email protected]>
and please add
Signature · 2 lines
Sincerely yours, Mike.
Quoted 16 lines · Mike Rapoport
Quoted 11 lines · Andrew Morton
Quoted 6 lines · On Thu, 8 Jan 2026 10:15:39 +0000 Ben Dooks <[email protected]> wrote:
The '
numa_nodes_parsed' is defined in <asm/numa.h> but this file is not included inmm/numa_memblks.c(buildx86_64) so add this to the incldues to fix the following sparse warning:
mm/numa_memblks.c:13:12: warning: symbol 'numa_nodes_parsed' was not declared. Should it be static?huh, I wonder how that snuck through and survived more than a year.
Probably most configs include <
asm/numa.h> as other header dependencies and Ben's config does not for some reason.
Quoted 8 lines
Quoted 4 lines
Thanks, I'll add
Fixes 87482708210f ("mm: introduce numa_memblks")Cc <[email protected]>and please add
Reviewed-by Mike Rapoport (Microsoft) <[email protected]>
Thanks.
I think I was building the riscv64 defconfig
Signature · 4 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html
Quoted 16 lines · Ben Dooks
The '
numa_nodes_parsed' is defined in <asm/numa.h> but this file is not included inmm/numa_memblks.c(buildx86_64) so add this to the incldues to fix the following sparse warning:
mm/numa_memblks.c:13:12: warning: symbol 'numa_nodes_parsed' was not declared. Should it be static?Signed-off-by Ben Dooks <[email protected]>--- mm/numa_memblks.c | 2 ++ 1 file changed, 2 insertions(+)mm/numa_memblks.c +0
-0
mm/numa_memblks.c line 14
Quoted 8 lines
mm/numa_memblks.c +2
-0@@ -7,6 +7,8 @@#include <linux/numa.h> #include <linux/numa_memblks.h> +#include <asm/numa.h> +int numa_distance_cnt;static u8 *numa_distance;