From: Oscar Salvador <osalvador@suse.de>
To: Donet Tom <donettom@linux.ibm.com>
Cc: Mike Rapoport <rppt@kernel.org>,
David Hildenbrand <david@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
rafael@kernel.org, Danilo Krummrich <dakr@kernel.org>,
Ritesh Harjani <ritesh.list@gmail.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Alison Schofield <alison.schofield@intel.com>,
Yury Norov <yury.norov@gmail.com>,
Dave Jiang <dave.jiang@intel.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] driver/base: Remove unused functions
Date: Wed, 30 Apr 2025 09:48:01 +0200 [thread overview]
Message-ID: <aBHVsd21j45c2tjA@localhost.localdomain> (raw)
In-Reply-To: <273649393600cb33ac3eec0e9a523c2d1853a47c.1745852397.git.donettom@linux.ibm.com>
On Mon, Apr 28, 2025 at 10:33:47PM +0530, Donet Tom wrote:
> The functions register_mem_block_under_node_early and get_nid_for_pfn
> are not used, as register_memory_blocks_under_node_early is now used
> to register memory blocks during early boot. Therefore, these unused
> functions have been removed.
>
> Signed-off-by: Donet Tom <donettom@linux.ibm.com>
> ---
> drivers/base/node.c | 54 +--------------------------------------------
> 1 file changed, 1 insertion(+), 53 deletions(-)
...
> @@ -895,10 +846,7 @@ void register_memory_blocks_under_node(int nid, unsigned long start_pfn,
> {
> walk_memory_blocks_func_t func;
>
> - if (context == MEMINIT_HOTPLUG)
> - func = register_mem_block_under_node_hotplug;
> - else
> - func = register_mem_block_under_node_early;
> + func = register_mem_block_under_node_hotplug;
>
> walk_memory_blocks(PFN_PHYS(start_pfn), PFN_PHYS(end_pfn - start_pfn),
> (void *)&nid, func);
So we have now:
register_memory_blocks_under_node - wrt. hotplug
register_memory_blocks_under_node_early - wrt. boot
AFAICS, we can drop the 'context' parameter from this function because
we do not need it anymore, right? The functions that get called
eventually, register_mem_block_under_node_hotplug() and
register_mem_block_under_node_early(), already know its context and pass
it on to do_register_memory_block_under_node().
--
Oscar Salvador
SUSE Labs
next prev parent reply other threads:[~2025-04-30 7:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 17:03 [PATCH v2 1/2] driver/base: Optimize memory block registration to reduce boot time Donet Tom
2025-04-28 17:03 ` [PATCH v2 2/2] driver/base: Remove unused functions Donet Tom
2025-04-28 21:21 ` David Hildenbrand
2025-04-29 14:07 ` Donet Tom
2025-04-30 7:48 ` Oscar Salvador [this message]
2025-05-01 13:49 ` Donet Tom
2025-05-01 15:08 ` Zi Yan
2025-05-01 15:15 ` Donet Tom
2025-04-28 21:19 ` [PATCH v2 1/2] driver/base: Optimize memory block registration to reduce boot time David Hildenbrand
2025-04-29 14:08 ` Donet Tom
2025-04-29 16:37 ` kernel test robot
2025-04-29 17:01 ` kernel test robot
2025-05-01 14:10 ` Donet Tom
2025-04-30 7:38 ` Oscar Salvador
2025-05-01 13:55 ` Donet Tom
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=aBHVsd21j45c2tjA@localhost.localdomain \
--to=osalvador@suse.de \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=alison.schofield@intel.com \
--cc=dakr@kernel.org \
--cc=dave.jiang@intel.com \
--cc=david@redhat.com \
--cc=donettom@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rafael@kernel.org \
--cc=ritesh.list@gmail.com \
--cc=rppt@kernel.org \
--cc=yury.norov@gmail.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