uwb: use '%pM' format to print MAC address
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Mon, 13 Sep 2010 08:24:52 +0000 (11:24 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 22 Oct 2010 17:21:40 +0000 (10:21 -0700)
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/uwb/address.c
drivers/uwb/wlp/wss-lc.c

index 973321327c44b897ae3ae14eb95f2d33b784732f..8739c4f4d015a3cac54ed8881f660eb954ebd6f1 100644 (file)
@@ -363,10 +363,7 @@ size_t __uwb_addr_print(char *buf, size_t buf_size, const unsigned char *addr,
 {
        size_t result;
        if (type)
-               result = scnprintf(buf, buf_size,
-                                 "%02x:%02x:%02x:%02x:%02x:%02x",
-                                 addr[0], addr[1], addr[2],
-                                 addr[3], addr[4], addr[5]);
+               result = scnprintf(buf, buf_size, "%pM", addr);
        else
                result = scnprintf(buf, buf_size, "%02x:%02x",
                                  addr[1], addr[0]);
index a005d2a03b5d173c6f48febb5aa03d318d0b9c8f..67872c83b67975646d33a1d4188cc6b491698d81 100644 (file)
@@ -791,11 +791,8 @@ int wlp_wss_prep_hdr(struct wlp *wlp, struct wlp_eda_node *eda_entry,
        } else {
                if (printk_ratelimit())
                        dev_err(dev, "WLP: Destination neighbor (Ethernet: "
-                               "%02x:%02x:%02x:%02x:%02x:%02x, Dev: "
-                               "%02x:%02x) is not connected. \n", eth_addr[0],
-                               eth_addr[1], eth_addr[2], eth_addr[3],
-                               eth_addr[4], eth_addr[5], dev_addr->data[1],
-                               dev_addr->data[0]);
+                               "%pM, Dev: %02x:%02x) is not connected.\n",
+                               eth_addr, dev_addr->data[1], dev_addr->data[0]);
                result = -EINVAL;
        }
        return result;