Re: [PATCH] mm/page_alloc: include <linux/vmstat.h> for vm_numa_stat_key
From: Zi Yan
Date: Wed Jun 17 2026 - 11:48:08 EST
On 17 Jun 2026, at 9:27, Ben Dooks wrote:
> The vm_numa_stat_key is declared in <linux/vmstat.h> but this is
> 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(+)
>
vmstat.h is already included at line 37[1].
I wonder why sparse complains and why adding a duplicated one below fixes
it.
[1] https://elixir.bootlin.com/linux/v7.1/source/mm/page_alloc.c#L37
Best Regards,
Yan, Zi