mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00:00
tipc: constify dev_addr passing
In preparation for netdev->dev_addr being constant make all relevant arguments in tipc constant. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
1a8a23d2da
commit
6cf8628072
@ -462,7 +462,7 @@ int tipc_enable_l2_media(struct net *net, struct tipc_bearer *b,
|
||||
b->bcast_addr.media_id = b->media->type_id;
|
||||
b->bcast_addr.broadcast = TIPC_BROADCAST_SUPPORT;
|
||||
b->mtu = dev->mtu;
|
||||
b->media->raw2addr(b, &b->addr, (char *)dev->dev_addr);
|
||||
b->media->raw2addr(b, &b->addr, (const char *)dev->dev_addr);
|
||||
rcu_assign_pointer(dev->tipc_ptr, b);
|
||||
return 0;
|
||||
}
|
||||
@ -703,7 +703,7 @@ static int tipc_l2_device_event(struct notifier_block *nb, unsigned long evt,
|
||||
break;
|
||||
case NETDEV_CHANGEADDR:
|
||||
b->media->raw2addr(b, &b->addr,
|
||||
(char *)dev->dev_addr);
|
||||
(const char *)dev->dev_addr);
|
||||
tipc_reset_bearer(net, b);
|
||||
break;
|
||||
case NETDEV_UNREGISTER:
|
||||
|
@ -117,7 +117,7 @@ struct tipc_media {
|
||||
char *msg);
|
||||
int (*raw2addr)(struct tipc_bearer *b,
|
||||
struct tipc_media_addr *addr,
|
||||
char *raw);
|
||||
const char *raw);
|
||||
u32 priority;
|
||||
u32 tolerance;
|
||||
u32 min_win;
|
||||
|
@ -60,7 +60,7 @@ static int tipc_eth_addr2msg(char *msg, struct tipc_media_addr *addr)
|
||||
/* Convert raw mac address format to media addr format */
|
||||
static int tipc_eth_raw2addr(struct tipc_bearer *b,
|
||||
struct tipc_media_addr *addr,
|
||||
char *msg)
|
||||
const char *msg)
|
||||
{
|
||||
memset(addr, 0, sizeof(*addr));
|
||||
ether_addr_copy(addr->value, msg);
|
||||
|
@ -67,7 +67,7 @@ static int tipc_ib_addr2msg(char *msg, struct tipc_media_addr *addr)
|
||||
/* Convert raw InfiniBand address format to media addr format */
|
||||
static int tipc_ib_raw2addr(struct tipc_bearer *b,
|
||||
struct tipc_media_addr *addr,
|
||||
char *msg)
|
||||
const char *msg)
|
||||
{
|
||||
memset(addr, 0, sizeof(*addr));
|
||||
memcpy(addr->value, msg, INFINIBAND_ALEN);
|
||||
|
Loading…
Reference in New Issue
Block a user