diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2011-11-21 03:39:03 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-22 16:43:32 -0500 |
commit | 4e3fd7a06dc20b2d8ec6892233ad2012968fe7b6 (patch) | |
tree | da3fbec7672ac6b967dfa31cec6c88f468a57fa2 /drivers | |
parent | 40ba84993d66469d336099c5af74c3da5b73e28d (diff) | |
download | blackbird-op-linux-4e3fd7a06dc20b2d8ec6892233ad2012968fe7b6.tar.gz blackbird-op-linux-4e3fd7a06dc20b2d8ec6892233ad2012968fe7b6.zip |
net: remove ipv6_addr_copy()
C assignment can handle struct in6_addr copying.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/core/addr.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/core/cma.c | 8 | ||||
-rw-r--r-- | drivers/net/bonding/bond_ipv6.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/cnic.c | 2 |
4 files changed, 11 insertions, 13 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 691276bafd78..adf0757280ed 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -243,8 +243,8 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, int ret; memset(&fl6, 0, sizeof fl6); - ipv6_addr_copy(&fl6.daddr, &dst_in->sin6_addr); - ipv6_addr_copy(&fl6.saddr, &src_in->sin6_addr); + fl6.daddr = dst_in->sin6_addr; + fl6.saddr = src_in->sin6_addr; fl6.flowi6_oif = addr->bound_dev_if; dst = ip6_route_output(&init_net, NULL, &fl6); @@ -258,7 +258,7 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, goto put; src_in->sin6_family = AF_INET6; - ipv6_addr_copy(&src_in->sin6_addr, &fl6.saddr); + src_in->sin6_addr = fl6.saddr; } if (dst->dev->flags & IFF_LOOPBACK) { diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 75ff821c0af0..09e66cce05d3 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -2005,11 +2005,11 @@ static int cma_resolve_loopback(struct rdma_id_private *id_priv) if (cma_zero_addr(src)) { dst = (struct sockaddr *) &id_priv->id.route.addr.dst_addr; if ((src->sa_family = dst->sa_family) == AF_INET) { - ((struct sockaddr_in *) src)->sin_addr.s_addr = - ((struct sockaddr_in *) dst)->sin_addr.s_addr; + ((struct sockaddr_in *)src)->sin_addr = + ((struct sockaddr_in *)dst)->sin_addr; } else { - ipv6_addr_copy(&((struct sockaddr_in6 *) src)->sin6_addr, - &((struct sockaddr_in6 *) dst)->sin6_addr); + ((struct sockaddr_in6 *)src)->sin6_addr = + ((struct sockaddr_in6 *)dst)->sin6_addr; } } diff --git a/drivers/net/bonding/bond_ipv6.c b/drivers/net/bonding/bond_ipv6.c index 027a0ee7d85b..7e6632221a75 100644 --- a/drivers/net/bonding/bond_ipv6.c +++ b/drivers/net/bonding/bond_ipv6.c @@ -50,7 +50,7 @@ static void bond_glean_dev_ipv6(struct net_device *dev, struct in6_addr *addr) struct inet6_ifaddr *ifa = list_first_entry(&idev->addr_list, struct inet6_ifaddr, if_list); - ipv6_addr_copy(addr, &ifa->addr); + *addr = ifa->addr; } else ipv6_addr_set(addr, 0, 0, 0, 0); @@ -168,8 +168,7 @@ static int bond_inet6addr_event(struct notifier_block *this, switch (event) { case NETDEV_UP: if (ipv6_addr_any(&bond->master_ipv6)) - ipv6_addr_copy(&bond->master_ipv6, - &ifa->addr); + bond->master_ipv6 = ifa->addr; return NOTIFY_OK; case NETDEV_DOWN: if (ipv6_addr_equal(&bond->master_ipv6, @@ -191,8 +190,7 @@ static int bond_inet6addr_event(struct notifier_block *this, switch (event) { case NETDEV_UP: if (ipv6_addr_any(&vlan->vlan_ipv6)) - ipv6_addr_copy(&vlan->vlan_ipv6, - &ifa->addr); + vlan->vlan_ipv6 = ifa->addr; return NOTIFY_OK; case NETDEV_DOWN: if (ipv6_addr_equal(&vlan->vlan_ipv6, diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index 6f10c6939834..099f41d99ec0 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c @@ -3475,7 +3475,7 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr, struct flowi6 fl6; memset(&fl6, 0, sizeof(fl6)); - ipv6_addr_copy(&fl6.daddr, &dst_addr->sin6_addr); + fl6.daddr = dst_addr->sin6_addr; if (ipv6_addr_type(&fl6.daddr) & IPV6_ADDR_LINKLOCAL) fl6.flowi6_oif = dst_addr->sin6_scope_id; |