Skip to content

Commit

Permalink
bonding: use nla_get_u64 to extract the value for IFLA_BOND_AD_ACTOR_…
Browse files Browse the repository at this point in the history
…SYSTEM

bond_opt_initval expects a u64 type param, it's better to use
nla_get_u64 to extract the value here, to eliminate a sparse
endianness mismatch warning.

Fixes: 171a42c ("bonding: add netlink support for sys prio, actor sys mac, and port key")
Signed-off-by: Xin Long <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lxin authored and davem330 committed Nov 28, 2017
1 parent a8dd397 commit 5eb3d22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ static int bond_changelink(struct net_device *bond_dev, struct nlattr *tb[],
return -EINVAL;

bond_opt_initval(&newval,
nla_get_be64(data[IFLA_BOND_AD_ACTOR_SYSTEM]));
nla_get_u64(data[IFLA_BOND_AD_ACTOR_SYSTEM]));
err = __bond_opt_set(bond, BOND_OPT_AD_ACTOR_SYSTEM, &newval);
if (err)
return err;
Expand Down

0 comments on commit 5eb3d22

Please sign in to comment.