Skip to contentSkip to conversation

pch_phub: use kernel's '%pM' format option to print MAC

PATCH New Andy Shevchenko 1 participant 1 message Jul 18, 2011 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pch_phub: use kernel's '%pM' format option to print MAC

Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/misc/pch_phub.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/misc/pch_phub.c +1 -2
index 0fd7e77..7044756 100644
@@ -594,8 +594,7 @@ static ssize_t show_pch_mac(struct device *dev, struct device_attribute *attr,
 
 	pch_phub_read_gbe_mac_addr(chip, mac);
 
-	return sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x\n",
-				mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
+	return sprintf(buf, "%pM\n", mac);
 }
 
 static ssize_t store_pch_mac(struct device *dev, struct device_attribute *attr,
Signature · 1 line
1.7.5.4