aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r--drivers/net/bonding/bond_sysfs.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 99c79a4e0806..296a865b75d2 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -672,8 +672,8 @@ static ssize_t bonding_show_arp_targets(struct device *d,
672 672
673 for (i = 0; i < BOND_MAX_ARP_TARGETS; i++) { 673 for (i = 0; i < BOND_MAX_ARP_TARGETS; i++) {
674 if (bond->params.arp_targets[i]) 674 if (bond->params.arp_targets[i])
675 res += sprintf(buf + res, "%u.%u.%u.%u ", 675 res += sprintf(buf + res, "%pI4 ",
676 NIPQUAD(bond->params.arp_targets[i])); 676 &bond->params.arp_targets[i]);
677 } 677 }
678 if (res) 678 if (res)
679 buf[res-1] = '\n'; /* eat the leftover space */ 679 buf[res-1] = '\n'; /* eat the leftover space */
@@ -695,8 +695,8 @@ static ssize_t bonding_store_arp_targets(struct device *d,
695 if (buf[0] == '+') { 695 if (buf[0] == '+') {
696 if ((newtarget == 0) || (newtarget == htonl(INADDR_BROADCAST))) { 696 if ((newtarget == 0) || (newtarget == htonl(INADDR_BROADCAST))) {
697 printk(KERN_ERR DRV_NAME 697 printk(KERN_ERR DRV_NAME
698 ": %s: invalid ARP target %u.%u.%u.%u specified for addition\n", 698 ": %s: invalid ARP target %pI4 specified for addition\n",
699 bond->dev->name, NIPQUAD(newtarget)); 699 bond->dev->name, &newtarget);
700 ret = -EINVAL; 700 ret = -EINVAL;
701 goto out; 701 goto out;
702 } 702 }
@@ -704,8 +704,8 @@ static ssize_t bonding_store_arp_targets(struct device *d,
704 for (i = 0; (i < BOND_MAX_ARP_TARGETS); i++) { 704 for (i = 0; (i < BOND_MAX_ARP_TARGETS); i++) {
705 if (targets[i] == newtarget) { /* duplicate */ 705 if (targets[i] == newtarget) { /* duplicate */
706 printk(KERN_ERR DRV_NAME 706 printk(KERN_ERR DRV_NAME
707 ": %s: ARP target %u.%u.%u.%u is already present\n", 707 ": %s: ARP target %pI4 is already present\n",
708 bond->dev->name, NIPQUAD(newtarget)); 708 bond->dev->name, &newtarget);
709 if (done) 709 if (done)
710 targets[i] = 0; 710 targets[i] = 0;
711 ret = -EINVAL; 711 ret = -EINVAL;
@@ -713,8 +713,8 @@ static ssize_t bonding_store_arp_targets(struct device *d,
713 } 713 }
714 if (targets[i] == 0 && !done) { 714 if (targets[i] == 0 && !done) {
715 printk(KERN_INFO DRV_NAME 715 printk(KERN_INFO DRV_NAME
716 ": %s: adding ARP target %d.%d.%d.%d.\n", 716 ": %s: adding ARP target %pI4.\n",
717 bond->dev->name, NIPQUAD(newtarget)); 717 bond->dev->name, &newtarget);
718 done = 1; 718 done = 1;
719 targets[i] = newtarget; 719 targets[i] = newtarget;
720 } 720 }
@@ -731,8 +731,8 @@ static ssize_t bonding_store_arp_targets(struct device *d,
731 else if (buf[0] == '-') { 731 else if (buf[0] == '-') {
732 if ((newtarget == 0) || (newtarget == htonl(INADDR_BROADCAST))) { 732 if ((newtarget == 0) || (newtarget == htonl(INADDR_BROADCAST))) {
733 printk(KERN_ERR DRV_NAME 733 printk(KERN_ERR DRV_NAME
734 ": %s: invalid ARP target %d.%d.%d.%d specified for removal\n", 734 ": %s: invalid ARP target %pI4 specified for removal\n",
735 bond->dev->name, NIPQUAD(newtarget)); 735 bond->dev->name, &newtarget);
736 ret = -EINVAL; 736 ret = -EINVAL;
737 goto out; 737 goto out;
738 } 738 }
@@ -740,16 +740,16 @@ static ssize_t bonding_store_arp_targets(struct device *d,
740 for (i = 0; (i < BOND_MAX_ARP_TARGETS); i++) { 740 for (i = 0; (i < BOND_MAX_ARP_TARGETS); i++) {
741 if (targets[i] == newtarget) { 741 if (targets[i] == newtarget) {
742 printk(KERN_INFO DRV_NAME 742 printk(KERN_INFO DRV_NAME
743 ": %s: removing ARP target %d.%d.%d.%d.\n", 743 ": %s: removing ARP target %pI4.\n",
744 bond->dev->name, NIPQUAD(newtarget)); 744 bond->dev->name, &newtarget);
745 targets[i] = 0; 745 targets[i] = 0;
746 done = 1; 746 done = 1;
747 } 747 }
748 } 748 }
749 if (!done) { 749 if (!done) {
750 printk(KERN_INFO DRV_NAME 750 printk(KERN_INFO DRV_NAME
751 ": %s: unable to remove nonexistent ARP target %d.%d.%d.%d.\n", 751 ": %s: unable to remove nonexistent ARP target %pI4.\n",
752 bond->dev->name, NIPQUAD(newtarget)); 752 bond->dev->name, &newtarget);
753 ret = -EINVAL; 753 ret = -EINVAL;
754 goto out; 754 goto out;
755 } 755 }