Skip to contentSkip to conversation

staging: rtl8188eu: use %pM specifier instead of passing direct values

PATCH Superseded Mike Krinkin 2 participants 3 messages Mar 8, 2015 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: rtl8188eu: use %pM specifier instead of passing direct values

The patch converts code to use %pM specifier instead of pushing each byte via stack.

---
Changes in v2:
- use %pM instead %*ph as suggested by Larry Finger.

 drivers/staging/rtl8188eu/hal/usb_halinit.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/rtl8188eu/hal/usb_halinit.c +2 -4
index 122e9b3..960a7a5 100644
@@ -1096,10 +1096,8 @@ static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool
 		memcpy(eeprom->mac_addr, &hwinfo[EEPROM_MAC_ADDR_88EU], ETH_ALEN);
 	}
 	RT_TRACE(_module_hci_hal_init_c_, _drv_notice_,
-		 ("Hal_EfuseParseMACAddr_8188EU: Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n",
-		 eeprom->mac_addr[0], eeprom->mac_addr[1],
-		 eeprom->mac_addr[2], eeprom->mac_addr[3],
-		 eeprom->mac_addr[4], eeprom->mac_addr[5]));
+		 ("Hal_EfuseParseMACAddr_8188EU: Permanent Address = %6phD\n",
+		 eeprom->mac_addr));
 }
 
 static void
Signature · 1 line
1.9.1
#1 lore raw
Quoted 2 lines · Mike Krinkin

The patch converts code to use %pM specifier instead of pushing each byte via stack.

Hello Mike.

drivers/staging/rtl8188eu/hal/usb_halinit.c

Quoted 1 line
drivers/staging/rtl8188eu/hal/usb_halinit.c +0 -0

[]

drivers/staging/rtl8188eu/hal/usb_halinit.c static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool · line 1100

Quoted 10 lines
drivers/staging/rtl8188eu/hal/usb_halinit.c +2 -4
@@ -1096,10 +1096,8 @@ static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool
 		memcpy(eeprom->mac_addr, &hwinfo[EEPROM_MAC_ADDR_88EU], ETH_ALEN);
 	}
 	RT_TRACE(_module_hci_hal_init_c_, _drv_notice_,
-		 ("Hal_EfuseParseMACAddr_8188EU: Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n",
-		 eeprom->mac_addr[0], eeprom->mac_addr[1],
-		 eeprom->mac_addr[2], eeprom->mac_addr[3],
-		 eeprom->mac_addr[4], eeprom->mac_addr[5]));
+		 ("Hal_EfuseParseMACAddr_8188EU: Permanent Address = %6phD\n",
+		 eeprom->mac_addr));

You changed the subject and commit log but not
the patch. V3?

#2 lore raw
Quoted 8 lines · Joe Perches
Quoted 2 lines · Mike Krinkin

The patch converts code to use %pM specifier instead of pushing each byte via stack.

Hello Mike.

drivers/staging/rtl8188eu/hal/usb_halinit.c

Quoted 1 line
drivers/staging/rtl8188eu/hal/usb_halinit.c +0 -0

[]

Quoted 14 lines

drivers/staging/rtl8188eu/hal/usb_halinit.c static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool · line 1100

Quoted 10 lines
drivers/staging/rtl8188eu/hal/usb_halinit.c +2 -4
@@ -1096,10 +1096,8 @@ static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool
 		memcpy(eeprom->mac_addr, &hwinfo[EEPROM_MAC_ADDR_88EU], ETH_ALEN);
 	}
 	RT_TRACE(_module_hci_hal_init_c_, _drv_notice_,
-		 ("Hal_EfuseParseMACAddr_8188EU: Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n",
-		 eeprom->mac_addr[0], eeprom->mac_addr[1],
-		 eeprom->mac_addr[2], eeprom->mac_addr[3],
-		 eeprom->mac_addr[4], eeprom->mac_addr[5]));
+		 ("Hal_EfuseParseMACAddr_8188EU: Permanent Address = %6phD\n",
+		 eeprom->mac_addr));

You changed the subject and commit log but not
the patch. V3?

It was stupid fault... Sorry for noise.

Quoted 1 line