2009-12-30 19:49:43

by Hartley Sweeten

[permalink] [raw]
Subject: [PATCH] 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 <[email protected]>
Cc: Peter Jones <[email protected]>

---

diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index 051d1eb..5aeb3b5 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,


2010-01-04 15:41:11

by Peter Jones

[permalink] [raw]
Subject: Re: [PATCH] drivers/firmware/iscsi_ibft.c: use %pM to show MAC address

On 12/30/2009 02:49 PM, H Hartley Sweeten wrote:
> 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 <[email protected]>
> Cc: Peter Jones <[email protected]>

Looks good to me.

Acked-by: Peter Jones <[email protected]>

--
Peter

2010-01-05 16:33:50

by Hartley Sweeten

[permalink] [raw]
Subject: RE: [PATCH] drivers/firmware/iscsi_ibft.c: use %pM to show MAC address

On Monday, January 04, 2010 8:41 AM, Peter Jones wrote:
> On 12/30/2009 02:49 PM, H Hartley Sweeten wrote:
>> 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 <[email protected]>
>> Cc: Peter Jones <[email protected]>
>
> Looks good to me.
>
> Acked-by: Peter Jones <[email protected]>

Hello Peter,

Will you be merging this?

I sent a number of similar patches to the netdev list. David Miller
had merge issues with them due to a whitespace problem at the end of
the patches. I have figure out the issue and am reposting the patch
series now. If you have not merged this I will fix this one also and
send it to him with the others.

Thanks,
Hartley
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2010-01-05 16:36:05

by Peter Jones

[permalink] [raw]
Subject: Re: [PATCH] drivers/firmware/iscsi_ibft.c: use %pM to show MAC address

On 01/05/2010 11:33 AM, H Hartley Sweeten wrote:
> On Monday, January 04, 2010 8:41 AM, Peter Jones wrote:
>> On 12/30/2009 02:49 PM, H Hartley Sweeten wrote:
>>> 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 <[email protected]>
>>> Cc: Peter Jones <[email protected]>
>>
>> Looks good to me.
>>
>> Acked-by: Peter Jones <[email protected]>
>
> Hello Peter,
>
> Will you be merging this?
>
> I sent a number of similar patches to the netdev list. David Miller
> had merge issues with them due to a whitespace problem at the end of
> the patches. I have figure out the issue and am reposting the patch
> series now. If you have not merged this I will fix this one also and
> send it to him with the others.

You sending it to him for merge is fine by me.

--
Peter

All parts should go together without forcing. You must remember that
the parts you are reassembling were disassembled by you. Therefore,
if you can't get them together again, there must be a reason. By all
means, do not use a hammer.
-- IBM maintenance manual, 1925