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/netconsole.c | |
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/netconsole.c')
-rw-r--r-- | drivers/net/netconsole.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 9681618c3232..d304d38cd5d1 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -307,17 +307,14 @@ static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf) | |||
307 | static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) | 307 | static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) |
308 | { | 308 | { |
309 | struct net_device *dev = nt->np.dev; | 309 | struct net_device *dev = nt->np.dev; |
310 | static const u8 bcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | ||
310 | 311 | ||
311 | DECLARE_MAC_BUF(mac); | 312 | return snprintf(buf, PAGE_SIZE, "%pM\n", dev ? dev->dev_addr : bcast); |
312 | return snprintf(buf, PAGE_SIZE, "%s\n", dev ? | ||
313 | print_mac(mac, dev->dev_addr) : "ff:ff:ff:ff:ff:ff"); | ||
314 | } | 313 | } |
315 | 314 | ||
316 | static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf) | 315 | static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf) |
317 | { | 316 | { |
318 | DECLARE_MAC_BUF(mac); | 317 | return snprintf(buf, PAGE_SIZE, "%pM\n", nt->np.remote_mac); |
319 | return snprintf(buf, PAGE_SIZE, "%s\n", | ||
320 | print_mac(mac, nt->np.remote_mac)); | ||
321 | } | 318 | } |
322 | 319 | ||
323 | /* | 320 | /* |