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: <aC78_1-1CtAl0qlG@kernel.org>
Date: Thu, 22 May 2025 13:31:27 +0300
From: Mike Rapoport <rppt@...nel.org>
To: Oscar Salvador <osalvador@...e.de>
Cc: Donet Tom <donettom@...ux.ibm.com>,
	David Hildenbrand <david@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>, Zi Yan <ziy@...dia.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Ritesh Harjani <ritesh.list@...il.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	"Rafael J . Wysocki" <rafael@...nel.org>,
	Danilo Krummrich <dakr@...nel.org>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Alison Schofield <alison.schofield@...el.com>,
	Yury Norov <yury.norov@...il.com>,
	Dave Jiang <dave.jiang@...el.com>
Subject: Re: [PATCH v5 3/4] drivers/base/node: Remove
 register_memory_blocks_under_node() function call from register_one_node

On Thu, May 22, 2025 at 12:06:06PM +0200, Oscar Salvador wrote:
> On Thu, May 22, 2025 at 04:17:30AM -0500, Donet Tom wrote:
> > diff --git a/include/linux/node.h b/include/linux/node.h
> > index 5c763253c42c..6cf349c26780 100644
> > --- a/include/linux/node.h
> > +++ b/include/linux/node.h
> > @@ -136,18 +136,8 @@ static inline int register_one_node(int nid)
> >  {
> >  	int error = 0;
> >  
> > -	if (node_online(nid)) {
> > -		struct pglist_data *pgdat = NODE_DATA(nid);
> > -		unsigned long start_pfn = pgdat->node_start_pfn;
> > -		unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages;
> > -
> > +	if (node_online(nid))
> >  		error = __register_one_node(nid);
> 
> Heh, remembering this code always brings me joy.
> 
> After this patch, register_one_node() is only called from try_online_node(), right?
> Which, before calling in, explicitly sets the node online, so... we can get rid of
> the node_online() check unless I am missing something.
 
I think you are right and a sensible follow up cleanup can be renaming
__register_one_node() to register_one_node() :)
 
> -- 
> Oscar Salvador
> SUSE Labs
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ