lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3abcf12a-af48-4f38-815e-ec03c2c87c60@linux.ibm.com>
Date: Thu, 1 May 2025 19:19:59 +0530
From: Donet Tom <donettom@...ux.ibm.com>
To: Oscar Salvador <osalvador@...e.de>
Cc: Mike Rapoport <rppt@...nel.org>, David Hildenbrand <david@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>, rafael@...nel.org,
        Danilo Krummrich <dakr@...nel.org>,
        Ritesh Harjani <ritesh.list@...il.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Alison Schofield <alison.schofield@...el.com>,
        Yury Norov <yury.norov@...il.com>, Dave Jiang <dave.jiang@...el.com>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] driver/base: Remove unused functions


On 4/30/25 1:18 PM, Oscar Salvador wrote:
> 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@...ux.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().

Hi Oscar

Yes we can drop 'context' parameter.  I will add this change in next version.

Thanks
Donet


>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ