Skip to content

Commit eec73f1

Browse files
shemmingerdavem330
authored andcommitted
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>
1 parent 9805696 commit eec73f1

4 files changed

Lines changed: 0 additions & 26 deletions

File tree

‎net/tipc/bearer.c‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -184,25 +184,6 @@ struct tipc_bearer *tipc_bearer_find(const char *name)
184184
return NULL;
185185
}
186186

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-
206187
/**
207188
* tipc_bearer_get_names - record names of bearers in buffer
208189
*/

‎net/tipc/bearer.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ struct sk_buff *tipc_bearer_get_names(void);
190190
void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest);
191191
void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest);
192192
struct tipc_bearer *tipc_bearer_find(const char *name);
193-
struct tipc_bearer *tipc_bearer_find_interface(const char *if_name);
194193
struct tipc_media *tipc_media_find(const char *name);
195194
int tipc_bearer_setup(void);
196195
void tipc_bearer_cleanup(void);

‎net/tipc/node.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,6 @@ int tipc_node_active_links(struct tipc_node *n_ptr)
235235
return n_ptr->active_links[0] != NULL;
236236
}
237237

238-
int tipc_node_redundant_links(struct tipc_node *n_ptr)
239-
{
240-
return n_ptr->working_links > 1;
241-
}
242-
243238
int tipc_node_is_up(struct tipc_node *n_ptr)
244239
{
245240
return tipc_node_active_links(n_ptr);

‎net/tipc/node.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ void tipc_node_detach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr);
115115
void tipc_node_link_down(struct tipc_node *n_ptr, struct tipc_link *l_ptr);
116116
void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr);
117117
int tipc_node_active_links(struct tipc_node *n_ptr);
118-
int tipc_node_redundant_links(struct tipc_node *n_ptr);
119118
int tipc_node_is_up(struct tipc_node *n_ptr);
120119
struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space);
121120
struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space);

0 commit comments

Comments
 (0)