Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tipc: remove unused code

Remove dead code;
tipc_bearer_find_interface
tipc_node_redundant_links

This may break out of tree version of TIPC if there still is one.
But that maybe a good thing :-)

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

stephen hemminger and committed by
David S. Miller
eec73f1c 98056963

-26
-19
net/tipc/bearer.c
··· 185 185 } 186 186 187 187 /** 188 - * tipc_bearer_find_interface - locates bearer object with matching interface name 189 - */ 190 - struct tipc_bearer *tipc_bearer_find_interface(const char *if_name) 191 - { 192 - struct tipc_bearer *b_ptr; 193 - char *b_if_name; 194 - u32 i; 195 - 196 - for (i = 0, b_ptr = tipc_bearers; i < MAX_BEARERS; i++, b_ptr++) { 197 - if (!b_ptr->active) 198 - continue; 199 - b_if_name = strchr(b_ptr->name, ':') + 1; 200 - if (!strcmp(b_if_name, if_name)) 201 - return b_ptr; 202 - } 203 - return NULL; 204 - } 205 - 206 - /** 207 188 * tipc_bearer_get_names - record names of bearers in buffer 208 189 */ 209 190 struct sk_buff *tipc_bearer_get_names(void)
-1
net/tipc/bearer.h
··· 190 190 void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest); 191 191 void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest); 192 192 struct tipc_bearer *tipc_bearer_find(const char *name); 193 - struct tipc_bearer *tipc_bearer_find_interface(const char *if_name); 194 193 struct tipc_media *tipc_media_find(const char *name); 195 194 int tipc_bearer_setup(void); 196 195 void tipc_bearer_cleanup(void);
-5
net/tipc/node.c
··· 235 235 return n_ptr->active_links[0] != NULL; 236 236 } 237 237 238 - int tipc_node_redundant_links(struct tipc_node *n_ptr) 239 - { 240 - return n_ptr->working_links > 1; 241 - } 242 - 243 238 int tipc_node_is_up(struct tipc_node *n_ptr) 244 239 { 245 240 return tipc_node_active_links(n_ptr);
-1
net/tipc/node.h
··· 115 115 void tipc_node_link_down(struct tipc_node *n_ptr, struct tipc_link *l_ptr); 116 116 void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr); 117 117 int tipc_node_active_links(struct tipc_node *n_ptr); 118 - int tipc_node_redundant_links(struct tipc_node *n_ptr); 119 118 int tipc_node_is_up(struct tipc_node *n_ptr); 120 119 struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); 121 120 struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space);