aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/iscsi_ibft.c
diff options
context:
space:
mode:
authorhartleys <hartleys@visionengravers.com>2010-01-05 01:37:43 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-07 04:13:56 -0500
commit2c35294853b2e977bdfc9e401b7b6d881fcaa69b (patch)
treede8a7f1811ab86eaa46be6312505b6e2bc1274e9 /drivers/firmware/iscsi_ibft.c
parentaaa09ee7287d31f57f4dc8b4acca5cd59c1595f5 (diff)
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 <hsweeten@visionengravers.com> Acked-by: Peter Jones <pjones@redhat.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/firmware/iscsi_ibft.c')
-rw-r--r--drivers/firmware/iscsi_ibft.c6
1 files changed, 1 insertions, 5 deletions
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,
380 struct ibft_nic *nic = entry->nic; 380 struct ibft_nic *nic = entry->nic;
381 void *ibft_loc = entry->header; 381 void *ibft_loc = entry->header;
382 char *str = buf; 382 char *str = buf;
383 char *mac;
384 int val; 383 int val;
385 384
386 if (!nic) 385 if (!nic)
@@ -421,10 +420,7 @@ static ssize_t ibft_attr_show_nic(struct ibft_kobject *entry,
421 str += sprintf(str, "%d\n", nic->vlan); 420 str += sprintf(str, "%d\n", nic->vlan);
422 break; 421 break;
423 case ibft_eth_mac: 422 case ibft_eth_mac:
424 mac = nic->mac; 423 str += sprintf(str, "%pM\n", nic->mac);
425 str += sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x\n",
426 (u8)mac[0], (u8)mac[1], (u8)mac[2],
427 (u8)mac[3], (u8)mac[4], (u8)mac[5]);
428 break; 424 break;
429 case ibft_eth_hostname: 425 case ibft_eth_hostname:
430 str += sprintf_string(str, nic->hostname_len, 426 str += sprintf_string(str, nic->hostname_len,