Commit 6cf86280 authored by Jakub Kicinski's avatar Jakub Kicinski

tipc: constify dev_addr passing

In preparation for netdev->dev_addr being constant
make all relevant arguments in tipc constant.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1a8a23d2
...@@ -462,7 +462,7 @@ int tipc_enable_l2_media(struct net *net, struct tipc_bearer *b, ...@@ -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.media_id = b->media->type_id;
b->bcast_addr.broadcast = TIPC_BROADCAST_SUPPORT; b->bcast_addr.broadcast = TIPC_BROADCAST_SUPPORT;
b->mtu = dev->mtu; 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); rcu_assign_pointer(dev->tipc_ptr, b);
return 0; return 0;
} }
...@@ -703,7 +703,7 @@ static int tipc_l2_device_event(struct notifier_block *nb, unsigned long evt, ...@@ -703,7 +703,7 @@ static int tipc_l2_device_event(struct notifier_block *nb, unsigned long evt,
break; break;
case NETDEV_CHANGEADDR: case NETDEV_CHANGEADDR:
b->media->raw2addr(b, &b->addr, b->media->raw2addr(b, &b->addr,
(char *)dev->dev_addr); (const char *)dev->dev_addr);
tipc_reset_bearer(net, b); tipc_reset_bearer(net, b);
break; break;
case NETDEV_UNREGISTER: case NETDEV_UNREGISTER:
......
...@@ -117,7 +117,7 @@ struct tipc_media { ...@@ -117,7 +117,7 @@ struct tipc_media {
char *msg); char *msg);
int (*raw2addr)(struct tipc_bearer *b, int (*raw2addr)(struct tipc_bearer *b,
struct tipc_media_addr *addr, struct tipc_media_addr *addr,
char *raw); const char *raw);
u32 priority; u32 priority;
u32 tolerance; u32 tolerance;
u32 min_win; u32 min_win;
......
...@@ -60,7 +60,7 @@ static int tipc_eth_addr2msg(char *msg, struct tipc_media_addr *addr) ...@@ -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 */ /* Convert raw mac address format to media addr format */
static int tipc_eth_raw2addr(struct tipc_bearer *b, static int tipc_eth_raw2addr(struct tipc_bearer *b,
struct tipc_media_addr *addr, struct tipc_media_addr *addr,
char *msg) const char *msg)
{ {
memset(addr, 0, sizeof(*addr)); memset(addr, 0, sizeof(*addr));
ether_addr_copy(addr->value, msg); ether_addr_copy(addr->value, msg);
......
...@@ -67,7 +67,7 @@ static int tipc_ib_addr2msg(char *msg, struct tipc_media_addr *addr) ...@@ -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 */ /* Convert raw InfiniBand address format to media addr format */
static int tipc_ib_raw2addr(struct tipc_bearer *b, static int tipc_ib_raw2addr(struct tipc_bearer *b,
struct tipc_media_addr *addr, struct tipc_media_addr *addr,
char *msg) const char *msg)
{ {
memset(addr, 0, sizeof(*addr)); memset(addr, 0, sizeof(*addr));
memcpy(addr->value, msg, INFINIBAND_ALEN); memcpy(addr->value, msg, INFINIBAND_ALEN);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment