aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c6
-rw-r--r--drivers/net/bonding/bond_sysfs.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 36eab0c4fb33..398e299ee1bd 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4199,9 +4199,9 @@ static int bond_check_params(struct bond_params *params)
4199 (arp_ip_count < BOND_MAX_ARP_TARGETS) && arp_ip_target[i]; i++) { 4199 (arp_ip_count < BOND_MAX_ARP_TARGETS) && arp_ip_target[i]; i++) {
4200 /* not complete check, but should be good enough to 4200 /* not complete check, but should be good enough to
4201 catch mistakes */ 4201 catch mistakes */
4202 __be32 ip = in_aton(arp_ip_target[i]); 4202 __be32 ip;
4203 if (!isdigit(arp_ip_target[i][0]) || ip == 0 || 4203 if (!in4_pton(arp_ip_target[i], -1, (u8 *)&ip, -1, NULL) ||
4204 ip == htonl(INADDR_BROADCAST)) { 4204 IS_IP_TARGET_UNUSABLE_ADDRESS(ip)) {
4205 pr_warning("Warning: bad arp_ip_target module parameter (%s), ARP monitoring will not be performed\n", 4205 pr_warning("Warning: bad arp_ip_target module parameter (%s), ARP monitoring will not be performed\n",
4206 arp_ip_target[i]); 4206 arp_ip_target[i]);
4207 arp_interval = 0; 4207 arp_interval = 0;
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index abf5e106edc5..0ae580bbc5db 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1635,12 +1635,12 @@ static ssize_t bonding_show_packets_per_slave(struct device *d,
1635 char *buf) 1635 char *buf)
1636{ 1636{
1637 struct bonding *bond = to_bond(d); 1637 struct bonding *bond = to_bond(d);
1638 int packets_per_slave = bond->params.packets_per_slave; 1638 unsigned int packets_per_slave = bond->params.packets_per_slave;
1639 1639
1640 if (packets_per_slave > 1) 1640 if (packets_per_slave > 1)
1641 packets_per_slave = reciprocal_value(packets_per_slave); 1641 packets_per_slave = reciprocal_value(packets_per_slave);
1642 1642
1643 return sprintf(buf, "%d\n", packets_per_slave); 1643 return sprintf(buf, "%u\n", packets_per_slave);
1644} 1644}
1645 1645
1646static ssize_t bonding_store_packets_per_slave(struct device *d, 1646static ssize_t bonding_store_packets_per_slave(struct device *d,