From: "Jinhui Guo" <guojinhui.liam@bytedance.com>
To: <david@kernel.org>
Cc: <Liam.Howlett@oracle.com>, <akpm@linux-foundation.org>,
<fvdl@google.com>, <guojinhui.liam@bytedance.com>,
<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
<lorenzo.stoakes@oracle.com>, <mhocko@suse.com>,
<rppt@kernel.org>, <surenb@google.com>
Subject: Re: [PATCH] mm/sparse: Fix sparse_vmemmap_init_nid_early definition without CONFIG_SPARSEMEM
Date: Thu, 27 Nov 2025 20:14:10 +0800 [thread overview]
Message-ID: <20251127121410.357-1-guojinhui.liam@bytedance.com> (raw)
In-Reply-To: <3cdc6bd6-f0c4-410f-b2a2-8cc2b5d1c522@kernel.org>
Hi, David
On Thu, Nov 27, 2025 at 10:46:54AM +0100, David Hildenbrand (Red Hat) wrote:
> On 11/27/25 10:25, Jinhui Guo wrote:
> > When CONFIG_SPARSEMEM is disabled, the macro
> > sparse_vmemmap_init_nid_early(_nid, _use) passes
> > two arguments, while the actual function accepts
> > only nid. Drop the extra argument _use.
> >
> > Fixes: d65917c42373 ("mm/sparse: allow for alternate vmemmap section init at boot")
> > Signed-off-by: Jinhui Guo <guojinhui.liam@bytedance.com>
> > ---
> > include/linux/mmzone.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> > index 7fb7331c5725..f6dd181a4821 100644
> > --- a/include/linux/mmzone.h
> > +++ b/include/linux/mmzone.h
> > @@ -2293,7 +2293,7 @@ void sparse_init(void);
> > #else
> > #define sparse_init() do {} while (0)
> > #define sparse_index_init(_sec, _nid) do {} while (0)
> > -#define sparse_vmemmap_init_nid_early(_nid, _use) do {} while (0)
> > +#define sparse_vmemmap_init_nid_early(_nid) do {} while (0)
> > #define sparse_vmemmap_init_nid_late(_nid) do {} while (0)
> > #define pfn_in_present_section pfn_valid
> > #define subsection_map_init(_pfn, _nr_pages) do {} while (0)
>
> That commit is from early 2025.
>
> So what are the symptoms we are fixing? I would have assumed a compile-time
> problem, but no built bot caught that?
I spotted the issue while porting the patches. It’s harmless. Both
sparse_index_init() and sparse_vmemmap_init_nid_early() are only
referenced in mm/sparse.c and mm/sparse-vmemmap.c. So they can simply
be deleted from include/linux/mmzone.h when CONFIG_SPARSEMEM is disabled.
> --
> Cheers
> David
--
Best regards,
Jinhui
prev parent reply other threads:[~2025-11-27 12:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 9:25 Jinhui Guo
2025-11-27 9:46 ` David Hildenbrand (Red Hat)
2025-11-27 10:29 ` Mike Rapoport
2025-11-27 12:14 ` Jinhui Guo [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=20251127121410.357-1-guojinhui.liam@bytedance.com \
--to=guojinhui.liam@bytedance.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=fvdl@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.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