Skip to content

Commit 11c416e

Browse files
andy-shevgregkh
authored andcommitted
staging: most: Use %pM format specifier for MAC addresses
Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 536a4f7 commit 11c416e

File tree

1 file changed

+2
-4
lines changed
  • drivers/staging/most/net

1 file changed

+2
-4
lines changed

drivers/staging/most/net/net.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,13 +564,11 @@ static void on_netinfo(struct most_interface *iface,
564564

565565
if (m && is_valid_ether_addr(m)) {
566566
if (!is_valid_ether_addr(dev->dev_addr)) {
567-
netdev_info(dev, "set mac %02x-%02x-%02x-%02x-%02x-%02x\n",
568-
m[0], m[1], m[2], m[3], m[4], m[5]);
567+
netdev_info(dev, "set mac %pM\n", m);
569568
ether_addr_copy(dev->dev_addr, m);
570569
netif_dormant_off(dev);
571570
} else if (!ether_addr_equal(dev->dev_addr, m)) {
572-
netdev_warn(dev, "reject mac %02x-%02x-%02x-%02x-%02x-%02x\n",
573-
m[0], m[1], m[2], m[3], m[4], m[5]);
571+
netdev_warn(dev, "reject mac %pM\n", m);
574572
}
575573
}
576574

0 commit comments

Comments
 (0)