Skip to contentSkip to conversation

m68k/sun3: Use %pM format specifier to print ethernet address

PATCH In review Alexander Kuleshov 2 participants 3 messages Aug 27, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k/sun3: Use %pM format specifier to print ethernet address

printk() supports %pM format specifier for printing 6-byte MAC/FDDI addresses in hex notation small buffers, let's use it intead of %x:%x...

---
 arch/m68k/sun3/idprom.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
arch/m68k/sun3/idprom.c +1 -4
index c86ac37..cfe9aa4 100644
@@ -125,8 +125,5 @@ void __init idprom_init(void)
 
 	display_system_type(idprom->id_machtype);
 
-	printk("Ethernet address: %x:%x:%x:%x:%x:%x\n",
-		    idprom->id_ethaddr[0], idprom->id_ethaddr[1],
-		    idprom->id_ethaddr[2], idprom->id_ethaddr[3],
-		    idprom->id_ethaddr[4], idprom->id_ethaddr[5]);
+	printk("Ethernet address: %pM\n", idprom->id_ethaddr);
 }
Signature · 1 line
2.5.0
#1 lore raw
Quoted 4 lines · Alexander Kuleshov

printk() supports %pM format specifier for printing 6-byte MAC/FDDI addresses in hex notation small buffers, let's use it intead of %x:%x...

Thanks, will apply and queue for v4.4.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
In reply to Alexander Kuleshov
Quoted 4 lines · Alexander Kuleshov

printk() supports %pM format specifier for printing 6-byte MAC/FDDI addresses in hex notation small buffers, let's use it intead of %x:%x...

Thanks, will apply and queue for v4.4.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds