Commit d3134c3b authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

uwb: use '%pM' format to print MAC address

Signed-off-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ecfa153e
...@@ -363,10 +363,7 @@ size_t __uwb_addr_print(char *buf, size_t buf_size, const unsigned char *addr, ...@@ -363,10 +363,7 @@ size_t __uwb_addr_print(char *buf, size_t buf_size, const unsigned char *addr,
{ {
size_t result; size_t result;
if (type) if (type)
result = scnprintf(buf, buf_size, result = scnprintf(buf, buf_size, "%pM", addr);
"%02x:%02x:%02x:%02x:%02x:%02x",
addr[0], addr[1], addr[2],
addr[3], addr[4], addr[5]);
else else
result = scnprintf(buf, buf_size, "%02x:%02x", result = scnprintf(buf, buf_size, "%02x:%02x",
addr[1], addr[0]); addr[1], addr[0]);
......
...@@ -791,11 +791,8 @@ int wlp_wss_prep_hdr(struct wlp *wlp, struct wlp_eda_node *eda_entry, ...@@ -791,11 +791,8 @@ int wlp_wss_prep_hdr(struct wlp *wlp, struct wlp_eda_node *eda_entry,
} else { } else {
if (printk_ratelimit()) if (printk_ratelimit())
dev_err(dev, "WLP: Destination neighbor (Ethernet: " dev_err(dev, "WLP: Destination neighbor (Ethernet: "
"%02x:%02x:%02x:%02x:%02x:%02x, Dev: " "%pM, Dev: %02x:%02x) is not connected.\n",
"%02x:%02x) is not connected. \n", eth_addr[0], eth_addr, dev_addr->data[1], dev_addr->data[0]);
eth_addr[1], eth_addr[2], eth_addr[3],
eth_addr[4], eth_addr[5], dev_addr->data[1],
dev_addr->data[0]);
result = -EINVAL; result = -EINVAL;
} }
return result; return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment