diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-27 18:59:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-27 20:06:18 -0400 |
commit | e174961ca1a0b28f7abf0be47973ad57cb74e5f0 (patch) | |
tree | e8f74ecd420a0e380a71670e5aec5c2a0c15640a /drivers/net/bonding | |
parent | 0c68ae2605dbcf67414d8d1f19af93be44b355fb (diff) |
net: convert print_mac to %pM
This converts pretty much everything to print_mac. There were
a few things that had conflicts which I have just dropped for
now, no harm done.
I've built an allyesconfig with this and looked at the files
that weren't built very carefully, but it's a huge patch.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 15 | ||||
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 4 |
2 files changed, 6 insertions, 13 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 832739f38db4..36e89e310e8a 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1791,7 +1791,6 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1791 | struct slave *slave, *oldcurrent; | 1791 | struct slave *slave, *oldcurrent; |
1792 | struct sockaddr addr; | 1792 | struct sockaddr addr; |
1793 | int mac_addr_differ; | 1793 | int mac_addr_differ; |
1794 | DECLARE_MAC_BUF(mac); | ||
1795 | 1794 | ||
1796 | /* slave is not a slave or master is not master of this slave */ | 1795 | /* slave is not a slave or master is not master of this slave */ |
1797 | if (!(slave_dev->flags & IFF_SLAVE) || | 1796 | if (!(slave_dev->flags & IFF_SLAVE) || |
@@ -1820,11 +1819,11 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1820 | if (!mac_addr_differ && (bond->slave_cnt > 1)) | 1819 | if (!mac_addr_differ && (bond->slave_cnt > 1)) |
1821 | printk(KERN_WARNING DRV_NAME | 1820 | printk(KERN_WARNING DRV_NAME |
1822 | ": %s: Warning: the permanent HWaddr of %s - " | 1821 | ": %s: Warning: the permanent HWaddr of %s - " |
1823 | "%s - is still in use by %s. " | 1822 | "%pM - is still in use by %s. " |
1824 | "Set the HWaddr of %s to a different address " | 1823 | "Set the HWaddr of %s to a different address " |
1825 | "to avoid conflicts.\n", | 1824 | "to avoid conflicts.\n", |
1826 | bond_dev->name, slave_dev->name, | 1825 | bond_dev->name, slave_dev->name, |
1827 | print_mac(mac, slave->perm_hwaddr), | 1826 | slave->perm_hwaddr, |
1828 | bond_dev->name, slave_dev->name); | 1827 | bond_dev->name, slave_dev->name); |
1829 | } | 1828 | } |
1830 | 1829 | ||
@@ -3285,7 +3284,6 @@ static void bond_info_show_master(struct seq_file *seq) | |||
3285 | 3284 | ||
3286 | if (bond->params.mode == BOND_MODE_8023AD) { | 3285 | if (bond->params.mode == BOND_MODE_8023AD) { |
3287 | struct ad_info ad_info; | 3286 | struct ad_info ad_info; |
3288 | DECLARE_MAC_BUF(mac); | ||
3289 | 3287 | ||
3290 | seq_puts(seq, "\n802.3ad info\n"); | 3288 | seq_puts(seq, "\n802.3ad info\n"); |
3291 | seq_printf(seq, "LACP rate: %s\n", | 3289 | seq_printf(seq, "LACP rate: %s\n", |
@@ -3305,8 +3303,8 @@ static void bond_info_show_master(struct seq_file *seq) | |||
3305 | ad_info.actor_key); | 3303 | ad_info.actor_key); |
3306 | seq_printf(seq, "\tPartner Key: %d\n", | 3304 | seq_printf(seq, "\tPartner Key: %d\n", |
3307 | ad_info.partner_key); | 3305 | ad_info.partner_key); |
3308 | seq_printf(seq, "\tPartner Mac Address: %s\n", | 3306 | seq_printf(seq, "\tPartner Mac Address: %pM\n", |
3309 | print_mac(mac, ad_info.partner_system)); | 3307 | ad_info.partner_system); |
3310 | } | 3308 | } |
3311 | } | 3309 | } |
3312 | } | 3310 | } |
@@ -3314,7 +3312,6 @@ static void bond_info_show_master(struct seq_file *seq) | |||
3314 | static void bond_info_show_slave(struct seq_file *seq, const struct slave *slave) | 3312 | static void bond_info_show_slave(struct seq_file *seq, const struct slave *slave) |
3315 | { | 3313 | { |
3316 | struct bonding *bond = seq->private; | 3314 | struct bonding *bond = seq->private; |
3317 | DECLARE_MAC_BUF(mac); | ||
3318 | 3315 | ||
3319 | seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name); | 3316 | seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name); |
3320 | seq_printf(seq, "MII Status: %s\n", | 3317 | seq_printf(seq, "MII Status: %s\n", |
@@ -3322,9 +3319,7 @@ static void bond_info_show_slave(struct seq_file *seq, const struct slave *slave | |||
3322 | seq_printf(seq, "Link Failure Count: %u\n", | 3319 | seq_printf(seq, "Link Failure Count: %u\n", |
3323 | slave->link_failure_count); | 3320 | slave->link_failure_count); |
3324 | 3321 | ||
3325 | seq_printf(seq, | 3322 | seq_printf(seq, "Permanent HW addr: %pM\n", slave->perm_hwaddr); |
3326 | "Permanent HW addr: %s\n", | ||
3327 | print_mac(mac, slave->perm_hwaddr)); | ||
3328 | 3323 | ||
3329 | if (bond->params.mode == BOND_MODE_8023AD) { | 3324 | if (bond->params.mode == BOND_MODE_8023AD) { |
3330 | const struct aggregator *agg | 3325 | const struct aggregator *agg |
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 3bdb47382521..99c79a4e0806 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -1391,13 +1391,11 @@ static ssize_t bonding_show_ad_partner_mac(struct device *d, | |||
1391 | { | 1391 | { |
1392 | int count = 0; | 1392 | int count = 0; |
1393 | struct bonding *bond = to_bond(d); | 1393 | struct bonding *bond = to_bond(d); |
1394 | DECLARE_MAC_BUF(mac); | ||
1395 | 1394 | ||
1396 | if (bond->params.mode == BOND_MODE_8023AD) { | 1395 | if (bond->params.mode == BOND_MODE_8023AD) { |
1397 | struct ad_info ad_info; | 1396 | struct ad_info ad_info; |
1398 | if (!bond_3ad_get_active_agg_info(bond, &ad_info)) { | 1397 | if (!bond_3ad_get_active_agg_info(bond, &ad_info)) { |
1399 | count = sprintf(buf,"%s\n", | 1398 | count = sprintf(buf, "%pM\n", ad_info.partner_system); |
1400 | print_mac(mac, ad_info.partner_system)); | ||
1401 | } | 1399 | } |
1402 | } | 1400 | } |
1403 | 1401 | ||