mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: Zi Yan <ziy@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Brendan Jackman <jackmanb@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/page_alloc: include <linux/vmstat.h> for vm_numa_stat_key
Date: Thu, 18 Jun 2026 11:00:49 +0100	[thread overview]
Message-ID: <8d529389-41ac-4d44-ab70-15b52047c3e3@codethink.co.uk> (raw)
In-Reply-To: <B35448B6-4958-4FF0-8AB6-5464C2D6C50F@nvidia.com>

On 17/06/2026 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 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@codethink.co.uk>
>> ---
>>   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.

Thanks for catching this, it turns out this warning is coming from the
riscv64 build and I re-ran the arm64 thinking this had been fixed. The
issue is actually riscv64 does not default CONFIG_NUMA which then does
not define the 'vm_numa_stat_key' but mm/page_alloc.c creates in anyway.

Will re-test by guarding 'vm_numa_stat_key' with CONFIG_NUMA

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

      parent reply	other threads:[~2026-06-18 10:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 13:27 Ben Dooks
2026-06-17 15:47 ` Zi Yan
2026-06-18  8:04   ` Ben Dooks
2026-06-18 10:00   ` Ben Dooks [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d529389-41ac-4d44-ab70-15b52047c3e3@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jackmanb@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®