Skip to contentSkip to conversation

m68k: Use vsprintf %pM extension

PATCH In review Joe Perches 3 participants 3 messages Jun 15, 2015 – Jun 16, 2015

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

PATCH 1/1 m68k: Use vsprintf %pM extension

Format mac addresses with the normal kernel extension.

---
 arch/m68k/68000/m68EZ328.c | 3 +--
 arch/m68k/68000/m68VZ328.c | 3 +--
 arch/m68k/68360/config.c   | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)
arch/m68k/68000/m68EZ328.c +1 -2
index 2195290..e6ab321 100644
@@ -62,8 +62,7 @@ void __init config_BSP(char *command, int len)
 #ifdef CONFIG_UCSIMM
   printk(KERN_INFO "uCsimm serial string [%s]\n",getserialnum());
   p = cs8900a_hwaddr = gethwaddr(0);
-  printk(KERN_INFO "uCsimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
-         p[0], p[1], p[2], p[3], p[4], p[5]);
+  printk(KERN_INFO "uCsimm hwaddr %pM\n", p);
 
   p = getbenv("APPEND");
   if (p) strcpy(p,command);
arch/m68k/68000/m68VZ328.c +1 -2
index 0e5e5a1..1154bdb 100644
@@ -152,8 +152,7 @@ static void __init init_hardware(char *command, int size)
 
 	printk(KERN_INFO "uCdimm serial string [%s]\n", getserialnum());
 	p = cs8900a_hwaddr = gethwaddr(0);
-	printk(KERN_INFO "uCdimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
-		p[0], p[1], p[2], p[3], p[4], p[5]);
+	printk(KERN_INFO "uCdimm hwaddr %pM\n", p);
 	p = getbenv("APPEND");
 	if (p)
 		strcpy(p, command);
arch/m68k/68360/config.c +1 -2
index fd1f948c..b65fe4e 100644
@@ -154,8 +154,7 @@ void __init config_BSP(char *command, int len)
 #if defined(CONFIG_UCQUICC) && 0
   printk(KERN_INFO "uCquicc serial string [%s]\n",getserialnum());
   p = scc1_hwaddr = gethwaddr(0);
-  printk(KERN_INFO "uCquicc hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
-         p[0], p[1], p[2], p[3], p[4], p[5]);
+  printk(KERN_INFO "uCquicc hwaddr %pM\n", p);
 
   p = getbenv("APPEND");
   if (p)
#1 lore raw

CC greg

Quoted 51 lines · Joe Perches

Format mac addresses with the normal kernel extension.

---
 arch/m68k/68000/m68EZ328.c | 3 +--
 arch/m68k/68000/m68VZ328.c | 3 +--
 arch/m68k/68360/config.c   | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)
arch/m68k/68000/m68EZ328.c +1 -2
index 2195290..e6ab321 100644
@@ -62,8 +62,7 @@ void __init config_BSP(char *command, int len)
 #ifdef CONFIG_UCSIMM
   printk(KERN_INFO "uCsimm serial string [%s]\n",getserialnum());
   p = cs8900a_hwaddr = gethwaddr(0);
-  printk(KERN_INFO "uCsimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
-         p[0], p[1], p[2], p[3], p[4], p[5]);
+  printk(KERN_INFO "uCsimm hwaddr %pM\n", p);
 
   p = getbenv("APPEND");
   if (p) strcpy(p,command);
arch/m68k/68000/m68VZ328.c +1 -2
index 0e5e5a1..1154bdb 100644
@@ -152,8 +152,7 @@ static void __init init_hardware(char *command, int size)
 
        printk(KERN_INFO "uCdimm serial string [%s]\n", getserialnum());
        p = cs8900a_hwaddr = gethwaddr(0);
-       printk(KERN_INFO "uCdimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
-               p[0], p[1], p[2], p[3], p[4], p[5]);
+       printk(KERN_INFO "uCdimm hwaddr %pM\n", p);
        p = getbenv("APPEND");
        if (p)
                strcpy(p, command);
arch/m68k/68360/config.c +1 -2
index fd1f948c..b65fe4e 100644
@@ -154,8 +154,7 @@ void __init config_BSP(char *command, int len)
 #if defined(CONFIG_UCQUICC) && 0
   printk(KERN_INFO "uCquicc serial string [%s]\n",getserialnum());
   p = scc1_hwaddr = gethwaddr(0);
-  printk(KERN_INFO "uCquicc hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
-         p[0], p[1], p[2], p[3], p[4], p[5]);
+  printk(KERN_INFO "uCquicc hwaddr %pM\n", p);
 
   p = getbenv("APPEND");
   if (p)
#2 lore raw
In reply to Joe Perches

Hi Joe,

Quoted 3 lines · Joe Perches

Format mac addresses with the normal kernel extension.

Thanks. I have pushed this into the m68knommu git tree (for-next branch) on kernel.org.

Regards
Greg

Quoted 56 lines
---
 arch/m68k/68000/m68EZ328.c | 3 +--
 arch/m68k/68000/m68VZ328.c | 3 +--
 arch/m68k/68360/config.c   | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)
arch/m68k/68000/m68EZ328.c +1 -2
index 2195290..e6ab321 100644
@@ -62,8 +62,7 @@ void __init config_BSP(char *command, int len)
 #ifdef CONFIG_UCSIMM
   printk(KERN_INFO "uCsimm serial string [%s]\n",getserialnum());
   p = cs8900a_hwaddr = gethwaddr(0);
-  printk(KERN_INFO "uCsimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
-         p[0], p[1], p[2], p[3], p[4], p[5]);
+  printk(KERN_INFO "uCsimm hwaddr %pM\n", p);
 
   p = getbenv("APPEND");
   if (p) strcpy(p,command);
arch/m68k/68000/m68VZ328.c +1 -2
index 0e5e5a1..1154bdb 100644
@@ -152,8 +152,7 @@ static void __init init_hardware(char *command, int size)
 
 	printk(KERN_INFO "uCdimm serial string [%s]\n", getserialnum());
 	p = cs8900a_hwaddr = gethwaddr(0);
-	printk(KERN_INFO "uCdimm hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
-		p[0], p[1], p[2], p[3], p[4], p[5]);
+	printk(KERN_INFO "uCdimm hwaddr %pM\n", p);
 	p = getbenv("APPEND");
 	if (p)
 		strcpy(p, command);
arch/m68k/68360/config.c +1 -3
index fd1f948c..b65fe4e 100644
@@ -154,8 +154,7 @@ void __init config_BSP(char *command, int len)
 #if defined(CONFIG_UCQUICC) && 0
   printk(KERN_INFO "uCquicc serial string [%s]\n",getserialnum());
   p = scc1_hwaddr = gethwaddr(0);
-  printk(KERN_INFO "uCquicc hwaddr %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
-         p[0], p[1], p[2], p[3], p[4], p[5]);
+  printk(KERN_INFO "uCquicc hwaddr %pM\n", p);
 
   p = getbenv("APPEND");
   if (p)
 
 
 
--

To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html