All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: "David Hildenbrand (Red Hat)" <david@kernel.org>
Cc: Jinhui Guo <guojinhui.liam@bytedance.com>,
	akpm@linux-foundation.org, lorenzo.stoakes@oracle.com,
	Liam.Howlett@oracle.com, vbabka@suse.cz, surenb@google.com,
	mhocko@suse.com, fvdl@google.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/sparse: Fix sparse_vmemmap_init_nid_early definition without CONFIG_SPARSEMEM
Date: Thu, 27 Nov 2025 12:29:45 +0200	[thread overview]
Message-ID: <aSgoGU_WM9f6RWNB@kernel.org> (raw)
In-Reply-To: <3cdc6bd6-f0c4-410f-b2a2-8cc2b5d1c522@kernel.org>

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?

Some of these are used only in sparse.c and sparse-vmmemap.c so with
CONFIG_SPARSE=n they are completely unused.

We probably should move them to mm/internal.h or even mm/sparse.h
 
> -- 
> Cheers
> David

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2025-11-27 10:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  9:25 [PATCH] mm/sparse: Fix sparse_vmemmap_init_nid_early definition without CONFIG_SPARSEMEM Jinhui Guo
2025-11-27  9:46 ` David Hildenbrand (Red Hat)
2025-11-27 10:29   ` Mike Rapoport [this message]
2025-11-27 12:14   ` Jinhui Guo

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=aSgoGU_WM9f6RWNB@kernel.org \
    --to=rppt@kernel.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=fvdl@google.com \
    --cc=guojinhui.liam@bytedance.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@suse.com \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.