Commit 27f38705 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Felipe Balbi

usb: gadget: ethernet: re-use %pM specifier to print MAC

Instead of custom approach the patch converts code to use %pM specifier to
print MAC.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent da89dba1
...@@ -729,9 +729,7 @@ static int get_ether_addr_str(u8 dev_addr[ETH_ALEN], char *str, int len) ...@@ -729,9 +729,7 @@ static int get_ether_addr_str(u8 dev_addr[ETH_ALEN], char *str, int len)
if (len < 18) if (len < 18)
return -EINVAL; return -EINVAL;
snprintf(str, len, "%02x:%02x:%02x:%02x:%02x:%02x", snprintf(str, len, "%pM", dev_addr);
dev_addr[0], dev_addr[1], dev_addr[2],
dev_addr[3], dev_addr[4], dev_addr[5]);
return 18; return 18;
} }
......
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