From: Mike Rapoport <rppt@kernel.org>
To: "Lorenzo Stoakes (Oracle)" <ljs@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>, Kees Cook <kees@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Michal Hocko <mhocko@suse.com>,
Suren Baghdasaryan <surenb@google.com>,
Vlastimil Babka <vbabka@kernel.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v2] memblock: move reserve_bootmem_range() to memblock.c and make it static
Date: Mon, 23 Mar 2026 16:01:49 +0200 [thread overview]
Message-ID: <acFHzfJp0CxR43fG@kernel.org> (raw)
In-Reply-To: <445a1456-68da-45e7-ac0a-c1ed0cd086c4@lucifer.local>
On Mon, Mar 23, 2026 at 12:37:51PM +0000, Lorenzo Stoakes (Oracle) wrote:
> On Mon, Mar 23, 2026 at 09:20:42AM +0200, Mike Rapoport wrote:
> > From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
> >
> > reserve_bootmem_region() is only called from
> > memmap_init_reserved_pages() and it was in mm/mm_init.c because of its
> > dependecies on static init_deferred_page().
> >
> > Since init_deferred_page() is not static anymore, move
> > reserve_bootmem_region(), rename it to memmap_init_reserved_range() and
> > make it static.
> >
> > Update the comment describing it to better reflect what the function
> > does and drop bogus comment about reserved pages in free_bootmem_page().
> >
> > Update memblock test stubs to reflect the core changes.
> >
> > Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
>
> LGTM and passed local tests so:
>
> Reviewed-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
Thanks!
> > ---
>
> FYI I saw the below when running make in tools/testing/memblock, doesn't look
> related to this change but maybe something to address?
>
>
> cc -I. -I../../include -Wall -O2 -fsanitize=address -fsanitize=undefined -D CONFIG_PHYS_ADDR_T_64BIT -c -o memblock.o memblock.c
> memblock.c: In function ‘memblock_add_range.isra’:
> memblock.c:710:17: warning: ‘end_rgn’ may be used uninitialized [-Wmaybe-uninitialized]
> 710 | memblock_merge_regions(type, start_rgn, end_rgn);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> memblock.c:616:42: note: ‘end_rgn’ was declared here
> 616 | int idx, nr_new, start_rgn = -1, end_rgn;
> | ^~~~~~~
Oddly enough it does not warn in the kernel build, so I kept ignoring this :)
Should be fixed indeed.
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-03-23 14:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 7:20 [PATCH v2] memblock: move reserve_bootmem_range() to memblock.c and make it static Mike Rapoport
2026-03-23 12:18 ` David Hildenbrand (Arm)
2026-03-23 12:37 ` Lorenzo Stoakes (Oracle)
2026-03-23 14:01 ` Mike Rapoport [this message]
2026-03-24 15:50 ` Mike Rapoport
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=acFHzfJp0CxR43fG@kernel.org \
--to=rppt@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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.