Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1660821 > unrolled thread
| Started by | Dou Liyang <douly.fnst@cn.fujitsu.com> |
|---|---|
| First post | 2017-06-08 09:20 +0200 |
| Last post | 2017-06-10 00:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mm: Drop useless local parameters of register_one_node() Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-06-08 09:20 +0200
Re: [PATCH] mm: Drop useless local parameters of register_one_node() David Rientjes <rientjes@google.com> - 2017-06-10 00:40 +0200
| From | Dou Liyang <douly.fnst@cn.fujitsu.com> |
|---|---|
| Date | 2017-06-08 09:20 +0200 |
| Subject | [PATCH] mm: Drop useless local parameters of register_one_node() |
| Message-ID | <tPZTA-1ak-29@gated-at.bofh.it> |
... 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
[toc] | [next] | [standalone]
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Date | 2017-06-10 00:40 +0200 |
| Subject | Re: [PATCH] mm: Drop useless local parameters of register_one_node() |
| Message-ID | <tQAJr-7ia-9@gated-at.bofh.it> |
| In reply to | #1660821 |
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>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web