public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] drivers/base/node.c: cleanups
@ 2007-10-24 16:24 Adrian Bunk
  2007-10-24 16:52 ` Christoph Lameter
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2007-10-24 16:24 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: linux-kernel

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;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [2.6 patch] drivers/base/node.c: cleanups
  2007-10-24 16:24 [2.6 patch] drivers/base/node.c: cleanups Adrian Bunk
@ 2007-10-24 16:52 ` Christoph Lameter
  2007-10-25  0:41   ` KAMEZAWA Hiroyuki
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Lameter @ 2007-10-24 16:52 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel, KAMEZAWA Hiroyuki

On Wed, 24 Oct 2007, Adrian Bunk wrote:

> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.6 patch] drivers/base/node.c: cleanups
  2007-10-24 16:52 ` Christoph Lameter
@ 2007-10-25  0:41   ` KAMEZAWA Hiroyuki
  0 siblings, 0 replies; 3+ messages in thread
From: KAMEZAWA Hiroyuki @ 2007-10-25  0:41 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: Adrian Bunk, linux-kernel, GOTO

On Wed, 24 Oct 2007 09:52:56 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> On Wed, 24 Oct 2007, Adrian Bunk wrote:
> 
> > 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.
> 
Yes, please leave them for a while...

Thanks,
-Kame

Thank you >> Christoph-san.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-25  0:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24 16:24 [2.6 patch] drivers/base/node.c: cleanups Adrian Bunk
2007-10-24 16:52 ` Christoph Lameter
2007-10-25  0:41   ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox