Skip to content

Commit

Permalink
drivers/firmware/iscsi_ibft.c: use %pM to show MAC address
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hartleys authored and David S. Miller committed Jan 7, 2010
1 parent aaa09ee commit 2c35294
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/firmware/iscsi_ibft.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2c35294

Please sign in to comment.