Skip to content

Commit ccc4ba2

Browse files
kaberdavem330
authored andcommitted
tipc: remove unused str2addr media callback
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a6bda45 commit ccc4ba2

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

net/tipc/bearer.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ struct tipc_bearer;
7777
* @enable_bearer: routine which enables a bearer
7878
* @disable_bearer: routine which disables a bearer
7979
* @addr2str: routine which converts media address to string
80-
* @str2addr: routine which converts media address from string
8180
* @addr2msg: routine which converts media address to protocol message area
8281
* @msg2addr: routine which converts media address from protocol message area
8382
* @bcast_addr: media address used in broadcasting
@@ -94,7 +93,6 @@ struct tipc_media {
9493
int (*enable_bearer)(struct tipc_bearer *b_ptr);
9594
void (*disable_bearer)(struct tipc_bearer *b_ptr);
9695
int (*addr2str)(struct tipc_media_addr *a, char *str_buf, int str_size);
97-
int (*str2addr)(struct tipc_media_addr *a, char *str_buf);
9896
int (*addr2msg)(struct tipc_media_addr *a, char *msg_area);
9997
int (*msg2addr)(struct tipc_media_addr *a, char *msg_area);
10098
struct tipc_media_addr bcast_addr;

net/tipc/eth_media.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -301,25 +301,6 @@ static int eth_addr2str(struct tipc_media_addr *a, char *str_buf, int str_size)
301301
return 0;
302302
}
303303

304-
/**
305-
* eth_str2addr - convert string to Ethernet address
306-
*/
307-
static int eth_str2addr(struct tipc_media_addr *a, char *str_buf)
308-
{
309-
char mac[ETH_ALEN];
310-
int r;
311-
312-
r = sscanf(str_buf, "%02x:%02x:%02x:%02x:%02x:%02x",
313-
(u32 *)&mac[0], (u32 *)&mac[1], (u32 *)&mac[2],
314-
(u32 *)&mac[3], (u32 *)&mac[4], (u32 *)&mac[5]);
315-
316-
if (r != ETH_ALEN)
317-
return 1;
318-
319-
eth_media_addr_set(a, mac);
320-
return 0;
321-
}
322-
323304
/**
324305
* eth_str2addr - convert Ethernet address format to message header format
325306
*/
@@ -351,7 +332,6 @@ static struct tipc_media eth_media_info = {
351332
.enable_bearer = enable_bearer,
352333
.disable_bearer = disable_bearer,
353334
.addr2str = eth_addr2str,
354-
.str2addr = eth_str2addr,
355335
.addr2msg = eth_addr2msg,
356336
.msg2addr = eth_msg2addr,
357337
.bcast_addr = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },

0 commit comments

Comments
 (0)