Commit 78f73d92 authored by Daniil Leshchev's avatar Daniil Leshchev Committed by Greg Kroah-Hartman

staging: rtl8723au: use %pM and %ph formatting

use %pM and %ph specifiers instead of placing each byte on stack.
(staging/rtl8723au/TODO)
Signed-off-by: default avatarDaniil Leshchev <meleodr@gmail.com>
Acked-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 485b099a
...@@ -361,33 +361,19 @@ int recvframe_chkmic(struct rtw_adapter *adapter, ...@@ -361,33 +361,19 @@ int recvframe_chkmic(struct rtw_adapter *adapter,
int i; int i;
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
"*(pframemic-8)-*(pframemic-1) =0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n", "*(pframemic-8)-*(pframemic-1) =%*phC\n",
*(pframemic - 8), *(pframemic - 7), 8, pframemic - 8);
*(pframemic - 6), *(pframemic - 5),
*(pframemic - 4), *(pframemic - 3),
*(pframemic - 2), *(pframemic - 1));
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
"*(pframemic-16)-*(pframemic-9) =0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n", "*(pframemic-16)-*(pframemic-9) =%*phC\n",
*(pframemic - 16), *(pframemic - 15), 8, pframemic - 16);
*(pframemic - 14), *(pframemic - 13),
*(pframemic - 12), *(pframemic - 11),
*(pframemic - 10), *(pframemic - 9));
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
"====== demp packet (len =%d) ======\n", "====== demp packet (len =%d) ======\n",
precvframe->pkt->len); precvframe->pkt->len);
for (i = 0; i < precvframe->pkt->len; i = i + 8) { for (i = 0; i < precvframe->pkt->len; i = i + 8) {
RT_TRACE(_module_rtl871x_recv_c_, RT_TRACE(_module_rtl871x_recv_c_,
_drv_err_, _drv_err_, "%*phC\n",
"0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n", 8, precvframe->pkt->data + i);
*(precvframe->pkt->data+i),
*(precvframe->pkt->data+i+1),
*(precvframe->pkt->data+i+2),
*(precvframe->pkt->data+i+3),
*(precvframe->pkt->data+i+4),
*(precvframe->pkt->data+i+5),
*(precvframe->pkt->data+i+6),
*(precvframe->pkt->data+i+7));
} }
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
"====== demp packet end [len =%d]======\n", "====== demp packet end [len =%d]======\n",
...@@ -1402,11 +1388,7 @@ static void dump_rx_pkt(struct sk_buff *skb, u16 type, int level) ...@@ -1402,11 +1388,7 @@ static void dump_rx_pkt(struct sk_buff *skb, u16 type, int level)
DBG_8723A("#############################\n"); DBG_8723A("#############################\n");
for (i = 0; i < 64; i = i + 8) for (i = 0; i < 64; i = i + 8)
DBG_8723A("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n", DBG_8723A("%*phC:\n", 8, ptr + i);
*(ptr + i), *(ptr + i + 1), *(ptr + i + 2),
*(ptr + i + 3), *(ptr + i + 4),
*(ptr + i + 5), *(ptr + i + 6),
*(ptr + i + 7));
DBG_8723A("#############################\n"); DBG_8723A("#############################\n");
} }
} }
......
...@@ -1454,21 +1454,11 @@ bthci_StartBeaconAndConnect( ...@@ -1454,21 +1454,11 @@ bthci_StartBeaconAndConnect(
} }
if (pBTInfo->BtAsocEntry[CurrentAssocNum].AMPRole == AMP_BTAP_CREATOR) { if (pBTInfo->BtAsocEntry[CurrentAssocNum].AMPRole == AMP_BTAP_CREATOR) {
snprintf((char *)pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 32, "AMP-%02x-%02x-%02x-%02x-%02x-%02x", snprintf((char *)pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 32,
padapter->eeprompriv.mac_addr[0], "AMP-%pMF", padapter->eeprompriv.mac_addr);
padapter->eeprompriv.mac_addr[1],
padapter->eeprompriv.mac_addr[2],
padapter->eeprompriv.mac_addr[3],
padapter->eeprompriv.mac_addr[4],
padapter->eeprompriv.mac_addr[5]);
} else if (pBTInfo->BtAsocEntry[CurrentAssocNum].AMPRole == AMP_BTAP_JOINER) { } else if (pBTInfo->BtAsocEntry[CurrentAssocNum].AMPRole == AMP_BTAP_JOINER) {
snprintf((char *)pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 32, "AMP-%02x-%02x-%02x-%02x-%02x-%02x", snprintf((char *)pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 32,
pBTInfo->BtAsocEntry[CurrentAssocNum].BTRemoteMACAddr[0], "AMP-%pMF", pBTInfo->BtAsocEntry[CurrentAssocNum].BTRemoteMACAddr);
pBTInfo->BtAsocEntry[CurrentAssocNum].BTRemoteMACAddr[1],
pBTInfo->BtAsocEntry[CurrentAssocNum].BTRemoteMACAddr[2],
pBTInfo->BtAsocEntry[CurrentAssocNum].BTRemoteMACAddr[3],
pBTInfo->BtAsocEntry[CurrentAssocNum].BTRemoteMACAddr[4],
pBTInfo->BtAsocEntry[CurrentAssocNum].BTRemoteMACAddr[5]);
} }
FillOctetString(pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsid, pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 21); FillOctetString(pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsid, pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 21);
...@@ -9475,10 +9465,8 @@ static void BTDM_Display8723ABtCoexInfo(struct rtw_adapter *padapter) ...@@ -9475,10 +9465,8 @@ static void BTDM_Display8723ABtCoexInfo(struct rtw_adapter *padapter)
psTdmaCase = pHalData->bt_coexist.halCoex8723.btdm1Ant.curPsTdma; psTdmaCase = pHalData->bt_coexist.halCoex8723.btdm1Ant.curPsTdma;
else else
psTdmaCase = pHalData->bt_coexist.halCoex8723.btdm2Ant.curPsTdma; psTdmaCase = pHalData->bt_coexist.halCoex8723.btdm2Ant.curPsTdma;
snprintf(btCoexDbgBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x case-%d", "PS TDMA(0x3a)", \ snprintf(btCoexDbgBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %*ph case-%d",
pHalData->bt_coexist.fw3aVal[0], pHalData->bt_coexist.fw3aVal[1], "PS TDMA(0x3a)", 5, pHalData->bt_coexist.fw3aVal, psTdmaCase);
pHalData->bt_coexist.fw3aVal[2], pHalData->bt_coexist.fw3aVal[3],
pHalData->bt_coexist.fw3aVal[4], psTdmaCase);
DCMD_Printf(btCoexDbgBuf); DCMD_Printf(btCoexDbgBuf);
snprintf(btCoexDbgBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d ", "Decrease Bt Power", \ snprintf(btCoexDbgBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d ", "Decrease Bt Power", \
......
...@@ -1021,10 +1021,8 @@ static void Hal_EfuseParseMACAddr_8723AU(struct rtw_adapter *padapter, ...@@ -1021,10 +1021,8 @@ static void Hal_EfuseParseMACAddr_8723AU(struct rtw_adapter *padapter,
} }
RT_TRACE(_module_hci_hal_init_c_, _drv_notice_, RT_TRACE(_module_hci_hal_init_c_, _drv_notice_,
"Hal_EfuseParseMACAddr_8723AU: Permanent Address =%02x:%02x:%02x:%02x:%02x:%02x\n", "Hal_EfuseParseMACAddr_8723AU: Permanent Address =%pM\n",
pEEPROM->mac_addr[0], pEEPROM->mac_addr[1], pEEPROM->mac_addr);
pEEPROM->mac_addr[2], pEEPROM->mac_addr[3],
pEEPROM->mac_addr[4], pEEPROM->mac_addr[5]);
} }
static void readAdapterInfo(struct rtw_adapter *padapter) static void readAdapterInfo(struct rtw_adapter *padapter)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment