Patchwork [08/11] usb/cdc_ncm: print MAC via printk format specifier

login
register
mail settings
Submitter Danny Kukawka
Date Feb. 24, 2012, 1:45 p.m.
Message ID <1330091162-8141-9-git-send-email-danny.kukawka@bisect.de>
Download mbox | patch
Permalink /patch/142838/
State Accepted
Delegated to: David Miller
Headers show

Comments

Danny Kukawka - Feb. 24, 2012, 1:45 p.m.
Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
 drivers/net/usb/cdc_ncm.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

Patch

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 3a539a9..81f86b8 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -579,11 +579,7 @@  advance:
 	if (temp)
 		goto error2;
 
-	dev_info(&dev->udev->dev, "MAC-Address: "
-				"0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
-				dev->net->dev_addr[0], dev->net->dev_addr[1],
-				dev->net->dev_addr[2], dev->net->dev_addr[3],
-				dev->net->dev_addr[4], dev->net->dev_addr[5]);
+	dev_info(&dev->udev->dev, "MAC-Address: %pM\n", dev->net->dev_addr);
 
 	dev->in = usb_rcvbulkpipe(dev->udev,
 		ctx->in_ep->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);