drivers/base/node.c: cleanups
PATCH 1/1 drivers/base/node.c: cleanups
This patch contains the following cleanups:
- make the following needlessly globalcode static:
- register_node()
- node_state_attr[]
- #if 0 the following unused global functions:
- unregister_node()
- unregister_one_node()
---
drivers/base/node.c | 8 ++++++-- include/linux/node.h | 7 ------- 2 files changed, 6 insertions(+), 9 deletions(-)
7db18803736afa998b26608e4a5da190d784c83f
drivers/base/node.c +6 -2
@@ -139,7 +139,7 @@ static SYSDEV_ATTR(distance, S_IRUGO, node_read_distance, NULL);* * Initialize and register the node device. */ -int register_node (struct node *node,int num,struct node *parent) +static int register_node (struct node *node,int num,struct node *parent) {int error;
@@ -156,6 +156,7 @@ int register_node(struct node *node, int num, struct node *parent)return error; } +#if 0 /** * unregister_node - unregister a node device * @node: node going away
@@ -172,6 +173,7 @@ void unregister_node(struct node *node) sysdev_unregister(&node->sysdev); } +#endif /* 0 */ struct node node_devices[MAX_NUMNODES ];
@@ -228,10 +230,12 @@ int register_one_node(int nid) } +#if 0 void unregister_one_node (int nid) {unregister_node (&node_devices[nid]); } +#endif /* 0 */ /* * node states attributes
@@ -287,7 +291,7 @@ static SYSDEV_CLASS_ATTR(has_high_memory, 0444, print_nodes_has_high_memory, NULL);#endif -struct sysdev_class_attribute *node_state_attr[] = { +static struct sysdev_class_attribute *node_state_attr[] = { &attr_possible, &attr_online, &attr_has_normal_memory,
include/linux/node.h +0 -7
@@ -28,11 +28,8 @@ struct node {extern struct node node_devices[]; -extern int register_node (struct node *,int ,struct node *); -extern void unregister_node (struct node *node);#ifdef CONFIG_NUMA extern int register_one_node (int nid); -extern void unregister_one_node (int nid);extern int register_cpu_under_node (unsigned int cpu,unsigned int nid);extern int unregister_cpu_under_node (unsigned int cpu,unsigned int nid);#else
@@ -40,10 +37,6 @@ static inline int register_one_node(int nid) {return 0 ; } -static inline int unregister_one_node (int nid) -{ -return 0 ; -}static inline int register_cpu_under_node (unsigned int cpu,unsigned int nid) {return 0 ;
Quoted 7 lines · Adrian Bunk
This patch contains the following cleanups:
- make the following needlessly globalcode static:
-register_node()
- node_state_attr[]
- #if 0 the following unused global functions:
-unregister_node()
-unregister_one_node()
These may beneeded by the memory hotplug folks. Better leave them alone.
Quoted 10 lines · On Wed, 24 Oct 2007 09:52:56 -0700 (PDT) Christoph Lameter <[email protected]>…
Quoted 7 lines · Adrian Bunk
This patch contains the following cleanups:
- make the following needlessly globalcode static:
-register_node()
- node_state_attr[]
- #if 0 the following unused global functions:
-unregister_node()
-unregister_one_node()
Quoted 3 lines
These may beneeded by the memory hotplug folks. Better leave them alone.
Yes, please leave them for a while...
Thanks,
-Kame
Thank you >> Christoph-san.