]> Git Repo - linux.git/commitdiff
mm: drop useless local parameters of __register_one_node()
authorDou Liyang <[email protected]>
Mon, 10 Jul 2017 22:49:20 +0000 (15:49 -0700)
committerLinus Torvalds <[email protected]>
Mon, 10 Jul 2017 23:32:32 +0000 (16:32 -0700)
__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().

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Dou Liyang <[email protected]>
Acked-by: David Rientjes <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/base/node.c

index 73d39bc58c42d647e565655b052c6ae6356ce759..d8dc83017d8dc09f27c5c7eff657e05cf6dd028e 100644 (file)
@@ -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) {
This page took 0.057084 seconds and 4 git commands to generate.