Commit a7be6e5a authored by Dou Liyang's avatar Dou Liyang Committed by Linus Torvalds
Browse files

mm: drop useless local parameters of __register_one_node()

__register_one_node() 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().


Signed-off-by: default avatarDou Liyang <>
Acked-by: default avatarDavid Rientjes <>
Acked-by: default avatarMichal Hocko <>
Cc: <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 727c080f
......@@ -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;
......@@ -567,19 +567,14 @@ static void init_node_hugetlb_work(int nid) { }
int __register_one_node(int nid)
int p_node = parent_node(nid);
struct node *parent = NULL;
int error;
int cpu;
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) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment