Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bonding/alb: convert to using slave printk macros

All of these printk instances benefit from having both master and slave
device information included, so convert to using a standardized macro
format and remove redundant information.

Suggested-by: Joe Perches <joe@perches.com>
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jarod Wilson and committed by
David S. Miller
7ea2e423 17720981

+15 -15
+15 -15
drivers/net/bonding/bond_alb.c
··· 300 300 if (arp->op_code == htons(ARPOP_REPLY)) { 301 301 /* update rx hash table for this ARP */ 302 302 rlb_update_entry_from_arp(bond, arp); 303 - netdev_dbg(bond->dev, "Server received an ARP Reply from client\n"); 303 + slave_dbg(bond->dev, slave->dev, "Server received an ARP Reply from client\n"); 304 304 } 305 305 out: 306 306 return RX_HANDLER_ANOTHER; ··· 442 442 client_info->slave->dev->dev_addr, 443 443 client_info->mac_dst); 444 444 if (!skb) { 445 - netdev_err(client_info->slave->bond->dev, 446 - "failed to create an ARP packet\n"); 445 + slave_err(client_info->slave->bond->dev, 446 + client_info->slave->dev, 447 + "failed to create an ARP packet\n"); 447 448 continue; 448 449 } 449 450 ··· 668 667 if (tx_slave) 669 668 bond_hw_addr_copy(arp->mac_src, tx_slave->dev->dev_addr, 670 669 tx_slave->dev->addr_len); 671 - netdev_dbg(bond->dev, "Server sent ARP Reply packet\n"); 670 + netdev_dbg(bond->dev, "(slave %s): Server sent ARP Reply packet\n", 671 + tx_slave ? tx_slave->dev->name : "NULL"); 672 672 } else if (arp->op_code == htons(ARPOP_REQUEST)) { 673 673 /* Create an entry in the rx_hashtbl for this client as a 674 674 * place holder. 675 675 * When the arp reply is received the entry will be updated 676 676 * with the correct unicast address of the client. 677 677 */ 678 - rlb_choose_channel(skb, bond); 678 + tx_slave = rlb_choose_channel(skb, bond); 679 679 680 680 /* The ARP reply packets must be delayed so that 681 681 * they can cancel out the influence of the ARP request. ··· 689 687 * updated with their assigned mac. 690 688 */ 691 689 rlb_req_update_subnet_clients(bond, arp->ip_src); 692 - netdev_dbg(bond->dev, "Server sent ARP Request packet\n"); 690 + netdev_dbg(bond->dev, "(slave %s): Server sent ARP Request packet\n", 691 + tx_slave ? tx_slave->dev->name : "NULL"); 693 692 } 694 693 695 694 return tx_slave; ··· 926 923 skb->priority = TC_PRIO_CONTROL; 927 924 skb->dev = slave->dev; 928 925 929 - netdev_dbg(slave->bond->dev, 930 - "Send learning packet: dev %s mac %pM vlan %d\n", 931 - slave->dev->name, mac_addr, vid); 926 + slave_dbg(slave->bond->dev, slave->dev, 927 + "Send learning packet: mac %pM vlan %d\n", mac_addr, vid); 932 928 933 929 if (vid) 934 930 __vlan_hwaccel_put_tag(skb, vlan_proto, vid); ··· 1018 1016 memcpy(ss.__data, addr, len); 1019 1017 ss.ss_family = dev->type; 1020 1018 if (dev_set_mac_address(dev, (struct sockaddr *)&ss, NULL)) { 1021 - netdev_err(slave->bond->dev, "dev_set_mac_address of dev %s failed! ALB mode requires that the base driver support setting the hw address also when the network device's interface is open\n", 1022 - dev->name); 1019 + slave_err(slave->bond->dev, dev, "dev_set_mac_address on slave failed! ALB mode requires that the base driver support setting the hw address also when the network device's interface is open\n"); 1023 1020 return -EOPNOTSUPP; 1024 1021 } 1025 1022 return 0; ··· 1193 1192 alb_set_slave_mac_addr(slave, free_mac_slave->perm_hwaddr, 1194 1193 free_mac_slave->dev->addr_len); 1195 1194 1196 - netdev_warn(bond->dev, "the hw address of slave %s is in use by the bond; giving it the hw address of %s\n", 1197 - slave->dev->name, free_mac_slave->dev->name); 1195 + slave_warn(bond->dev, slave->dev, "the slave hw address is in use by the bond; giving it the hw address of %s\n", 1196 + free_mac_slave->dev->name); 1198 1197 1199 1198 } else if (has_bond_addr) { 1200 - netdev_err(bond->dev, "the hw address of slave %s is in use by the bond; couldn't find a slave with a free hw address to give it (this should not have happened)\n", 1201 - slave->dev->name); 1199 + slave_err(bond->dev, slave->dev, "the slave hw address is in use by the bond; couldn't find a slave with a free hw address to give it (this should not have happened)\n"); 1202 1200 return -EFAULT; 1203 1201 } 1204 1202