diff options
author | Scott Feldman <sfeldma@gmail.com> | 2015-05-13 06:03:52 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-13 16:26:27 (GMT) |
commit | 7a7ee5312d133a01cb23626c133ae30692ecb748 (patch) | |
tree | 5ffdd713353c351ced771f5dbddd378285ce890f /drivers | |
parent | 22c1f67ea5cd3296ee82df7397fb5e5f81eccb98 (diff) | |
download | linux-7a7ee5312d133a01cb23626c133ae30692ecb748.tar.xz |
switchdev: sparse warning: pass ipv4 fib dst as network-byte order
And let driver convert it to host-byte order as needed.
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/rocker/rocker.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c index 1fc006b..ca53393 100644 --- a/drivers/net/ethernet/rocker/rocker.c +++ b/drivers/net/ethernet/rocker/rocker.c @@ -4471,7 +4471,7 @@ static int rocker_port_obj_add(struct net_device *dev, case SWITCHDEV_OBJ_IPV4_FIB: fib4 = &obj->ipv4_fib; err = rocker_port_fib_ipv4(rocker_port, obj->trans, - fib4->dst, fib4->dst_len, + htonl(fib4->dst), fib4->dst_len, fib4->fi, fib4->tb_id, 0); break; default: @@ -4525,8 +4525,9 @@ static int rocker_port_obj_del(struct net_device *dev, case SWITCHDEV_OBJ_IPV4_FIB: fib4 = &obj->ipv4_fib; err = rocker_port_fib_ipv4(rocker_port, SWITCHDEV_TRANS_NONE, - fib4->dst, fib4->dst_len, fib4->fi, - fib4->tb_id, ROCKER_OP_FLAG_REMOVE); + htonl(fib4->dst), fib4->dst_len, + fib4->fi, fib4->tb_id, + ROCKER_OP_FLAG_REMOVE); break; default: err = -EOPNOTSUPP; |