2009-07-16 09:00:40

by Tobias Klauser

[permalink] [raw]
Subject: [PATCH 7/8] rt2x00: Use %pM conversion specifier

Use the %pM conversion specifier for printk instead of print_mac.

Signed-off-by: Tobias Klauser <[email protected]>
---
drivers/net/wireless/rt2x00/rt2800usb.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 3756166..da84afb 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -2224,10 +2224,8 @@ static int rt2800usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
- DECLARE_MAC_BUF(macbuf);
-
random_ether_addr(mac);
- EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
+ EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}

rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
--
1.6.0.4



2009-07-16 20:27:35

by Ivo Van Doorn

[permalink] [raw]
Subject: Re: [PATCH 7/8] rt2x00: Use %pM conversion specifier

On Thursday 16 July 2009, Tobias Klauser wrote:
> Use the %pM conversion specifier for printk instead of print_mac.
>
> Signed-off-by: Tobias Klauser <[email protected]>

Acked-by: Ivo van Doorn <[email protected]>

> ---
> drivers/net/wireless/rt2x00/rt2800usb.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> index 3756166..da84afb 100644
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -2224,10 +2224,8 @@ static int rt2800usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
> */
> mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
> if (!is_valid_ether_addr(mac)) {
> - DECLARE_MAC_BUF(macbuf);
> -
> random_ether_addr(mac);
> - EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
> + EEPROM(rt2x00dev, "MAC: %pM\n", mac);
> }
>
> rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);



2009-07-16 20:36:15

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH 7/8] rt2x00: Use %pM conversion specifier

On Thu, Jul 16, 2009 at 1:27 PM, Ivo van Doorn<[email protected]> wrote:
> On Thursday 16 July 2009, Tobias Klauser wrote:
>> Use the %pM conversion specifier for printk instead of print_mac.
>>
>> Signed-off-by: Tobias Klauser <[email protected]>
>
> Acked-by: Ivo van Doorn <[email protected]>

Johannes already has a patch for this posted which takes care of all of these.

http://marc.info/?l=linux-wireless&m=124767211929848&w=2

Luis