diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-10-13 09:20:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-16 14:13:24 -0400 |
commit | 31e3c3f6f1f9b154981a0e6620df700463db30ee (patch) | |
tree | 5ed74529c528cc9a09d6f8c9a5083aaf4849b62e /net/tipc/node.c | |
parent | 15419227f773b6c1b5fae44bde876078a9204caa (diff) |
tipc: cleanup function namespace
Do some cleanups of TIPC based on make namespacecheck
1. Don't export unused symbols
2. Eliminate dead code
3. Make functions and variables local
4. Rename buf_acquire to tipc_buf_acquire since it is used in several files
Compile tested only.
This make break out of tree kernel modules that depend on TIPC routines.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 823e9abb7ef5..b4d87eb2dc5d 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -50,7 +50,8 @@ void node_print(struct print_buf *buf, struct tipc_node *n_ptr, char *str); | |||
50 | static void node_lost_contact(struct tipc_node *n_ptr); | 50 | static void node_lost_contact(struct tipc_node *n_ptr); |
51 | static void node_established_contact(struct tipc_node *n_ptr); | 51 | static void node_established_contact(struct tipc_node *n_ptr); |
52 | 52 | ||
53 | struct tipc_node *tipc_nodes = NULL; /* sorted list of nodes within cluster */ | 53 | /* sorted list of nodes within cluster */ |
54 | static struct tipc_node *tipc_nodes = NULL; | ||
54 | 55 | ||
55 | static DEFINE_SPINLOCK(node_create_lock); | 56 | static DEFINE_SPINLOCK(node_create_lock); |
56 | 57 | ||
@@ -587,22 +588,6 @@ void tipc_node_remove_router(struct tipc_node *n_ptr, u32 router) | |||
587 | node_lost_contact(n_ptr); | 588 | node_lost_contact(n_ptr); |
588 | } | 589 | } |
589 | 590 | ||
590 | u32 tipc_available_nodes(const u32 domain) | ||
591 | { | ||
592 | struct tipc_node *n_ptr; | ||
593 | u32 cnt = 0; | ||
594 | |||
595 | read_lock_bh(&tipc_net_lock); | ||
596 | for (n_ptr = tipc_nodes; n_ptr; n_ptr = n_ptr->next) { | ||
597 | if (!tipc_in_scope(domain, n_ptr->addr)) | ||
598 | continue; | ||
599 | if (tipc_node_is_up(n_ptr)) | ||
600 | cnt++; | ||
601 | } | ||
602 | read_unlock_bh(&tipc_net_lock); | ||
603 | return cnt; | ||
604 | } | ||
605 | |||
606 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) | 591 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) |
607 | { | 592 | { |
608 | u32 domain; | 593 | u32 domain; |