* [PATCH] mm: Drop useless local parameters of register_one_node()
@ 2017-06-08 7:14 Dou Liyang
2017-06-09 22:33 ` David Rientjes
0 siblings, 1 reply; 2+ messages in thread
From: Dou Liyang @ 2017-06-08 7:14 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, kosaki.motohiro, isimatu.yasuaki, rientjes, Dou Liyang
... initializes local parameters "p_node" & "parent" for
register_node().
But, register_node() does not use them.
Remove the related code of "parent" node, cleanup register_one_node()
and register_node().
[Test in Qemu by 4 hotpluggable nodes in x86-64 system]
Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
drivers/base/node.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 5548f96..ea6e70ba 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -288,7 +288,7 @@ static void node_device_release(struct device *dev)
*
* Initialize and register the node device.
*/
-static int register_node(struct node *node, int num, struct node *parent)
+static int register_node(struct node *node, int num)
{
int error;
@@ -582,17 +582,11 @@ int register_one_node(int nid)
int cpu;
if (node_online(nid)) {
- int p_node = parent_node(nid);
- struct node *parent = NULL;
-
- if (p_node != nid)
- parent = node_devices[p_node];
-
node_devices[nid] = kzalloc(sizeof(struct node), GFP_KERNEL);
if (!node_devices[nid])
return -ENOMEM;
- error = register_node(node_devices[nid], nid, parent);
+ error = register_node(node_devices[nid], nid);
/* link cpu under this node */
for_each_present_cpu(cpu) {
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: Drop useless local parameters of register_one_node()
2017-06-08 7:14 [PATCH] mm: Drop useless local parameters of register_one_node() Dou Liyang
@ 2017-06-09 22:33 ` David Rientjes
0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2017-06-09 22:33 UTC (permalink / raw)
To: Dou Liyang; +Cc: linux-kernel, akpm, kosaki.motohiro, isimatu.yasuaki
On Thu, 8 Jun 2017, Dou Liyang wrote:
> ... initializes local parameters "p_node" & "parent" for
> register_node().
>
> But, register_node() does not use them.
>
> Remove the related code of "parent" node, cleanup register_one_node()
> and register_node().
>
> [Test in Qemu by 4 hotpluggable nodes in x86-64 system]
>
> Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-09 22:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-08 7:14 [PATCH] mm: Drop useless local parameters of register_one_node() Dou Liyang
2017-06-09 22:33 ` David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).