Re: [PATCH] mm/page_alloc: include <linux/vmstat.h> for vm_numa_stat_key
From: Ben Dooks
Date: Thu Jun 18 2026 - 04:04:56 EST
On 2026-06-17 16:47, Zi Yan wrote:
On 17 Jun 2026, at 9:27, Ben Dooks wrote:
The vm_numa_stat_key is declared in <linux/vmstat.h> but this isvmstat.h is already included at line 37[1].
currently not included in mm/page_alloc.c so include it to fix
the following sparse warning:
mm/page_alloc.c:165:1: warning: symbol 'vm_numa_stat_key' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>
---
mm/page_alloc.c | 1 +
1 file changed, 1 insertion(+)
I wonder why sparse complains and why adding a duplicated one below fixes
it.
I'll check, maybe the order is an issue here?
[1] https://elixir.bootlin.com/linux/v7.1/source/mm/page_alloc.c#L37
Best Regards,
Yan, Zi