Skip to contentSkip to conversation

mm: cleanup register_node()

PATCH In review Yasuaki Ishimatsu 3 participants 3 messages Oct 12, 2012 – Oct 13, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: cleanup register_node()

register_node() is defined as extern in include/linux/node.h. But the function is only called from register_one_node() in driver/base/node.c.

So the patch defines register_node() as static.

CC David Rientjes <[email protected]>
CC Andrew Morton <[email protected]>
---
 drivers/base/node.c  |    2 +-
 include/linux/node.h |    1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/base/node.c +1 -1
Index: linux-3.6/drivers/base/node.c
===================================================================
@@ -259,7 +259,7 @@ static inline void hugetlb_unregister_no
  *
  * 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;
 
include/linux/node.h +0 -1
Index: linux-3.6/include/linux/node.h
===================================================================
@@ -30,7 +30,6 @@ struct memory_block;
 extern struct node node_devices[];
 typedef  void (*node_registration_func_t)(struct node *);
 
-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);

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

Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Yasuaki Ishimatsu

register_node() is defined as extern in include/linux/node.h. But the function is only called from register_one_node() in driver/base/node.c.

So the patch defines register_node() as static.

CC David Rientjes <[email protected]>
CC Andrew Morton <[email protected]>

Thanks!

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

Acked-by on v1 1/1
#2 lore raw
In reply to Yasuaki Ishimatsu
Quoted 8 lines · Yasuaki Ishimatsu

register_node() is defined as extern in include/linux/node.h. But the function is only called from register_one_node() in driver/base/node.c.

So the patch defines register_node() as static.

CC David Rientjes <[email protected]>
CC Andrew Morton <[email protected]>

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