From: hartleys Date: Tue, 5 Jan 2010 06:37:43 +0000 (+0000) Subject: drivers/firmware/iscsi_ibft.c: use %pM to show MAC address X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2c35294853b2e977bdfc9e401b7b6d881fcaa69b;p=openwrt%2Fstaging%2Fblogic.git drivers/firmware/iscsi_ibft.c: use %pM to show MAC address Use the %pM kernel extension to display the MAC address. Also, remove the 'mac' variable and use nic->mac directly. Signed-off-by: H Hartley Sweeten Acked-by: Peter Jones Cc: David S. Miller Signed-off-by: David S. Miller --- diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c index 051d1ebbd287..5aeb3b541c80 100644 --- a/drivers/firmware/iscsi_ibft.c +++ b/drivers/firmware/iscsi_ibft.c @@ -380,7 +380,6 @@ static ssize_t ibft_attr_show_nic(struct ibft_kobject *entry, struct ibft_nic *nic = entry->nic; void *ibft_loc = entry->header; char *str = buf; - char *mac; int val; if (!nic) @@ -421,10 +420,7 @@ static ssize_t ibft_attr_show_nic(struct ibft_kobject *entry, str += sprintf(str, "%d\n", nic->vlan); break; case ibft_eth_mac: - mac = nic->mac; - str += sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x\n", - (u8)mac[0], (u8)mac[1], (u8)mac[2], - (u8)mac[3], (u8)mac[4], (u8)mac[5]); + str += sprintf(str, "%pM\n", nic->mac); break; case ibft_eth_hostname: str += sprintf_string(str, nic->hostname_len,