linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Donet Tom <donettom@linux.ibm.com>
To: SeongJae Park <sj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@redhat.com>,
	Mike Rapoport <rppt@kernel.org>,
	Oscar Salvador <osalvador@suse.de>,
	Ritesh Harjani <ritesh.list@gmail.com>,
	Aboorva Devarajan <aboorvad@linux.ibm.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	rafael@kernel.org, Danilo Krummrich <dakr@kernel.org>,
	Dave Jiang <dave.jiang@intel.com>
Subject: Re: [PATCH v2 2/2] drivers/base/node: Fold unregister_node() into unregister_one_node()
Date: Fri, 17 Oct 2025 10:47:43 +0530	[thread overview]
Message-ID: <cff01514-9074-4c97-bcf1-d4e3594e48b0@linux.ibm.com> (raw)
In-Reply-To: <20251015172759.69864-1-sj@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3459 bytes --]


On 10/15/25 10:57 PM, SeongJae Park wrote:
> On Tue, 14 Oct 2025 21:09:17 +0530 Donet Tom<donettom@linux.ibm.com> wrote:
>
>> The function unregister_node() is only called from unregister_one_node().
>> This patch folds unregister_node() into its only caller and renames
>> unregister_one_node() to unregister_node().
>>
>> This reduces unnecessary indirection and simplifies the code structure.
>> No functional changes are introduced.
>>
>> Acked-by: David Hildenbrand<david@redhat.com>
>> Acked-by: Mike Rapoport (Microsoft)<rppt@kernel.org>
>> Signed-off-by: Donet Tom<donettom@linux.ibm.com>
> Acked-by: SeongJae Park<sj@kernel.org>
>
>> ---
>>   drivers/base/node.c  | 38 +++++++++++++++++---------------------
>>   include/linux/node.h |  6 ++----
>>   mm/memory_hotplug.c  |  4 ++--
>>   3 files changed, 21 insertions(+), 27 deletions(-)
>>
>> diff --git a/drivers/base/node.c b/drivers/base/node.c
>> index 4bcaa8006cd6..758b777dec1f 100644
>> --- a/drivers/base/node.c
>> +++ b/drivers/base/node.c
>> @@ -676,23 +676,6 @@ static void node_device_release(struct device *dev)
>>   	kfree(to_node(dev));
>>   }
>>   
>> -/**
>> - * unregister_node - unregister a node device
>> - * @node: node going away
>> - *
>> - * Unregisters a node device @node.  All the devices on the node must be
>> - * unregistered before calling this function.
>> - */
>> -void unregister_node(struct node *node)
>> -{
>> -	hugetlb_unregister_node(node);
>> -	compaction_unregister_node(node);
>> -	reclaim_unregister_node(node);
>> -	node_remove_accesses(node);
>> -	node_remove_caches(node);
>> -	device_unregister(&node->dev);
>> -}
>> -
>>   struct node *node_devices[MAX_NUMNODES];
>>   
>>   /*
>> @@ -924,13 +907,26 @@ int register_node(int nid)
>>   
>>   	return error;
>>   }
>> -
>> -void unregister_one_node(int nid)
>> +/**
>> + * unregister_node - unregister a node device
>> + * @nid: nid of the node going away
>> + *
>> + * Unregisters the node device at node id  @nid.  All the devices on the
> Nit.  Why two spaces before "@nid"?

Thank you for pointing this out.

Andrew could you please help apply the below fixlet on top of this patch?

 From 0d0345847ad33607c7ebae3798ef37ff16a20fd0 Mon Sep 17 00:00:00 2001
From: Donet Tom<donettom@linux.ibm.com>                                        
Date: Fri, 17 Oct 2025 10:27:54 +0530
Subject: [PATCH] [fixlet] drivers/base/node: Remove extra space in description
                                                                                 
This patch removes an extra space before @nid and "All".
                                                                                 
Signed-off-by: Donet Tom<donettom@linux.ibm.com>                               
---
  drivers/base/node.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
                                                                                 
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 63b223a3b38e..00cf4532f121 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -911,7 +911,7 @@ int register_node(int nid)
   * unregister_node - unregister a node device
   * @nid: nid of the node going away
   *
- * Unregisters the node device at node id  @nid.  All the devices on the
+ * Unregisters the node device at node id @nid. All the devices on the
   * node must be unregistered before calling this function.
   */
  void unregister_node(int nid)
--
2.51.0


>
> [...]
>
>
> Thanks,
> SJ

[-- Attachment #2: Type: text/html, Size: 6686 bytes --]

      reply	other threads:[~2025-10-17  5:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 15:39 [PATCH v2 0/2] drivers/base/node: fold node register and unregister functions Donet Tom
2025-10-14 15:39 ` [PATCH v2 1/2] drivers/base/node: Fold register_node() into register_one_node() Donet Tom
2025-10-15  3:53   ` kernel test robot
2025-10-15 12:27     ` Donet Tom
2025-10-15 12:36   ` David Hildenbrand
2025-10-17  5:25     ` Donet Tom
2025-10-15 17:26   ` SeongJae Park
2025-10-14 15:39 ` [PATCH v2 2/2] drivers/base/node: Fold unregister_node() into unregister_one_node() Donet Tom
2025-10-15 17:27   ` SeongJae Park
2025-10-17  5:17     ` Donet Tom [this message]

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=cff01514-9074-4c97-bcf1-d4e3594e48b0@linux.ibm.com \
    --to=donettom@linux.ibm.com \
    --cc=aboorvad@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=dakr@kernel.org \
    --cc=dave.jiang@intel.com \
    --cc=david@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mingo@redhat.com \
    --cc=osalvador@suse.de \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=ritesh.list@gmail.com \
    --cc=rppt@kernel.org \
    --cc=sj@kernel.org \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox