Skip to content

Commit

Permalink
cxgb4: Remove unnecessary struct in6_addr * casts
Browse files Browse the repository at this point in the history
Just use the address of the in6_addr.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Nov 10, 2014
1 parent c42e253 commit 4483589
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4310,17 +4310,15 @@ static int clip_add(struct net_device *event_dev, struct inet6_ifaddr *ifa,
if (cxgb4_netdev(event_dev)) {
switch (event) {
case NETDEV_UP:
ret = cxgb4_clip_get(event_dev,
(const struct in6_addr *)ifa->addr.s6_addr);
ret = cxgb4_clip_get(event_dev, &ifa->addr);
if (ret < 0) {
rcu_read_unlock();
return ret;
}
ret = NOTIFY_OK;
break;
case NETDEV_DOWN:
cxgb4_clip_release(event_dev,
(const struct in6_addr *)ifa->addr.s6_addr);
cxgb4_clip_release(event_dev, &ifa->addr);
ret = NOTIFY_OK;
break;
default:
Expand Down Expand Up @@ -4389,8 +4387,7 @@ static int update_dev_clip(struct net_device *root_dev, struct net_device *dev)

read_lock_bh(&idev->lock);
list_for_each_entry(ifa, &idev->addr_list, if_list) {
ret = cxgb4_clip_get(dev,
(const struct in6_addr *)ifa->addr.s6_addr);
ret = cxgb4_clip_get(dev, &ifa->addr);
if (ret < 0)
break;
}
Expand Down

0 comments on commit 4483589

Please sign in to comment.