<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 10/15/25 10:57 PM, SeongJae Park
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20251015172759.69864-1-sj@kernel.org">
      <pre wrap="" class="moz-quote-pre">On Tue, 14 Oct 2025 21:09:17 +0530 Donet Tom <a class="moz-txt-link-rfc2396E" href="mailto:donettom@linux.ibm.com"><donettom@linux.ibm.com></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">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 <a class="moz-txt-link-rfc2396E" href="mailto:david@redhat.com"><david@redhat.com></a>
Acked-by: Mike Rapoport (Microsoft) <a class="moz-txt-link-rfc2396E" href="mailto:rppt@kernel.org"><rppt@kernel.org></a>
Signed-off-by: Donet Tom <a class="moz-txt-link-rfc2396E" href="mailto:donettom@linux.ibm.com"><donettom@linux.ibm.com></a>
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
Acked-by: SeongJae Park <a class="moz-txt-link-rfc2396E" href="mailto:sj@kernel.org"><sj@kernel.org></a>
</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">---
 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
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
Nit.  Why two spaces before "@nid"?</pre>
    </blockquote>
    <pre>Thank you for pointing this out.
Andrew could you please help apply the below fixlet on top of this patch?</pre>
    <pre>From 0d0345847ad33607c7ebae3798ef37ff16a20fd0 Mon Sep 17 00:00:00 2001          
From: Donet Tom <a class="moz-txt-link-rfc2396E" href="mailto:donettom@linux.ibm.com"><donettom@linux.ibm.com></a>                                        
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 <a class="moz-txt-link-rfc2396E" href="mailto:donettom@linux.ibm.com"><donettom@linux.ibm.com></a>                               
---                                                                             
 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        </pre>
    <p></p>
    <p><br>
    </p>
    <blockquote type="cite"
      cite="mid:20251015172759.69864-1-sj@kernel.org">
      <pre wrap="" class="moz-quote-pre">
[...]
Thanks,
SJ
</pre>
    </blockquote>
  </body>
</html>