mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
da89dba1a0
commit
27f387059b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user