[2.6 patch] drivers/base/node.c: cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Adrian Bunk <[email protected]>

---

 drivers/base/node.c  |    8 ++++++--
 include/linux/node.h |    7 -------
 2 files changed, 6 insertions(+), 9 deletions(-)

7db18803736afa998b26608e4a5da190d784c83f 
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 88eeed7..a2448eb 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -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,
diff --git a/include/linux/node.h b/include/linux/node.h
index bc001bc..db6c064 100644
--- a/include/linux/node.h
+++ b/include/linux/node.h
@@ -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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux