提交 27f38705 编写于 作者: A Andy Shevchenko 提交者: 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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 da89dba1
......@@ -729,9 +729,7 @@ static int get_ether_addr_str(u8 dev_addr[ETH_ALEN], char *str, int len)
if (len < 18)
return -EINVAL;
snprintf(str, len, "%02x:%02x:%02x:%02x:%02x:%02x",
dev_addr[0], dev_addr[1], dev_addr[2],
dev_addr[3], dev_addr[4], dev_addr[5]);
snprintf(str, len, "%pM", dev_addr);
return 18;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册