Skip to contentSkip to conversation

bonding: force cast of IP address in options

PATCH Applied Stephen Hemminger 2 participants 2 messages Mar 10, 2014 – Mar 11, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: force cast of IP address in options

The option code is taking IP address and putting it into a generic container. Force cast to silence sparse warnings.

drivers/net/bonding/bond_netlink.c +1 -1
@@ -199,7 +199,7 @@ static int bond_changelink(struct net_de
 		nla_for_each_nested(attr, data[IFLA_BOND_ARP_IP_TARGET], rem) {
 			__be32 target = nla_get_be32(attr);
 
-			bond_opt_initval(&newval, target);
+			bond_opt_initval(&newval, (__force u64)target);
 			err = __bond_opt_set(bond, BOND_OPT_ARP_TARGETS,
 					     &newval);
 			if (err)