public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/base/node.c: cleanups
Date: Wed, 24 Oct 2007 18:24:53 +0200	[thread overview]
Message-ID: <20071024162453.GQ30533@stusta.de> (raw)

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 <bunk@kernel.org>

---

 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;


             reply	other threads:[~2007-10-24 16:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 16:24 Adrian Bunk [this message]
2007-10-24 16:52 ` [2.6 patch] drivers/base/node.c: cleanups Christoph Lameter
2007-10-25  0:41   ` KAMEZAWA Hiroyuki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071024162453.GQ30533@stusta.de \
    --to=bunk@kernel.org \
    --cc=clameter@engr.sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox