Skip to contentSkip to conversation

mm: numa,memblock: include <asm/numa.h> for 'numa_nodes_parsed'

PATCH Applied Ben Dooks 4 participants 5 messages Jan 8 – Jan 14

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

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
index 5b009a9cd8b4..8f5735fda0a2 100644
@@ -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
maintainer
#1 lore raw
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 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?

huh, I wonder how that snuck through and survived more than a year.

Thanks, I'll add

Fixes 87482708210f ("mm: introduce numa_memblks")
maintainer Reviewed-by
#2 lore raw
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 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?

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")

and please add

Signature · 2 lines
Sincerely yours,
Mike.
author
#3 lore raw
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 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?

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")

and please add

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
Reviewed-by on v1 1/1
#4 lore raw
In reply to Ben Dooks
Quoted 16 lines · Ben Dooks

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 +0 -0
index 5b009a9cd8b4..8f5735fda0a2 100644

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;