mm: Drop useless local parameters of __register_one_node()
Subsystems (2)
PATCH v2 1/1 mm: Drop useless local parameters of __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().
---
V1 --> V2:
Rebase it ongit://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm
drivers/base/node.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/base/node.c +2 -7
@@ -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) {
Signature · 9 lines
2.5.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · Dou Liyang
... initializes local parameters "
p_node" & "parent" forregister_node().But,
register_node()does not use them.Remove the related code of "parent" node, cleanup
__register_one_node()andregister_node().
Quoted 6 lines
Cc Andrew Morton <[email protected]>Cc David Rientjes <[email protected]>Cc Michal Hocko <[email protected]>Signed-off-by Dou Liyang <[email protected]>Acked-by David Rientjes <[email protected]>
I am sorry, this slipped through cracks.
Quoted 52 lines
---
V1 --> V2:
Rebase it ongit://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gitakpmdrivers/base/node.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)drivers/base/node.c +2
-7@@ -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) {Signature · 9 lines
2.5.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Hi Michal,
Quoted 16 lines · Michal Hocko
Quoted 8 lines · Dou Liyang
... initializes local parameters "
p_node" & "parent" forregister_node().But,
register_node()does not use them.Remove the related code of "parent" node, cleanup
__register_one_node()andregister_node().Quoted 6 lines
Cc Andrew Morton <[email protected]>Cc David Rientjes <[email protected]>Cc Michal Hocko <[email protected]>Signed-off-by Dou Liyang <[email protected]>Acked-by David Rientjes <[email protected]>
Quoted 2 lines
I am sorry, this slipped through cracks.
Acked-by Michal Hocko <[email protected]>
Thanks for your Acked-by, but this patch has been added to the -mm tree.
Its filename is
mm-drop-useless-local-parameters-of-__register_one_node.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-drop-useless-local-parameters-of-__register_one_node.patch
and later at
I don't know what should I do next ? :)
Thanks,
dou.
Quoted 48 lines
Quoted 48 lines
---
V1 --> V2:
Rebase it ongit://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gitakpmdrivers/base/node.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)drivers/base/node.c +2
-8@@ -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) { --2.5.5
Quoted 6 lines
Quoted 5 lines
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 19 lines · Dou Liyang
Hi Michal,
Quoted 16 lines · Michal Hocko
Quoted 14 lines · Dou Liyang
... initializes local parameters "
p_node" & "parent" forregister_node().But,
register_node()does not use them.Remove the related code of "parent" node, cleanup
__register_one_node()andregister_node().Cc Andrew Morton <[email protected]>Cc David Rientjes <[email protected]>Cc Michal Hocko <[email protected]>Signed-off-by Dou Liyang <[email protected]>Acked-by David Rientjes <[email protected]>
Quoted 6 lines
Quoted 2 lines
I am sorry, this slipped through cracks.
Acked-by Michal Hocko <[email protected]>Thanks for your Acked-by, but this patch has been added to the -mm tree. Its filename is
mm-drop-useless-local-parameters-of-__register_one_node.patch
Yeah, don't worry. Andrew will add the acked-by in his tree.
Quoted 8 lines
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-drop-useless-local-parameters-of-__register_one_node.patch
and later atI don't know what should I do next ? :)
Wait for Andrew to send this to Linus during the next merge window.
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 14 lines · Dou Liyang
... initializes local parameters "
p_node" & "parent" forregister_node().But,
register_node()does not use them.Remove the related code of "parent" node, cleanup
__register_one_node()andregister_node().Cc Andrew Morton <[email protected]>Cc David Rientjes <[email protected]>Cc Michal Hocko <[email protected]>Signed-off-by Dou Liyang <[email protected]>Acked-by David Rientjes <[email protected]>
Quoted 7 lines
---
V1 --> V2:
Rebase it ongit://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gitakpmdrivers/base/node.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
That appears to be the last user of parent_node().
Can we start removing it from the topology.h headers for each arch?
cheers
Hi Michael,
Quoted 21 lines · Michael Ellerman
Quoted 19 lines · Dou Liyang
... initializes local parameters "
p_node" & "parent" forregister_node().But,
register_node()does not use them.Remove the related code of "parent" node, cleanup
__register_one_node()andregister_node().Cc Andrew Morton <[email protected]>Cc David Rientjes <[email protected]>Cc Michal Hocko <[email protected]>Signed-off-by Dou Liyang <[email protected]>Acked-by David Rientjes <[email protected]>---
V1 --> V2:
Rebase it ongit://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gitakpm
Quoted 4 lines
Quoted 2 lines
drivers/base/node.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)That appears to be the last user of
parent_node().
Oops, yes, it is the last one.
Quoted 3 lines
Can we start removing it from the
topology.hheaders for each arch?
Yes, I think so.
Thanks,
dou.
Quoted 4 lines
cheers
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>