use %pM and %ph specifiers instead of placing each byte on stack.
(staging/rtl8723au/TODO)
Signed-off-by: Daniil Leshchev <meleodr@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
int i;
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 - 7),
- *(pframemic - 6), *(pframemic - 5),
- *(pframemic - 4), *(pframemic - 3),
- *(pframemic - 2), *(pframemic - 1));
+ "*(pframemic-8)-*(pframemic-1) =%*phC\n",
+ 8, pframemic - 8);
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 - 15),
- *(pframemic - 14), *(pframemic - 13),
- *(pframemic - 12), *(pframemic - 11),
- *(pframemic - 10), *(pframemic - 9));
+ "*(pframemic-16)-*(pframemic-9) =%*phC\n",
+ 8, pframemic - 16);
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
"====== demp packet (len =%d) ======\n",
precvframe->pkt->len);
for (i = 0; i < precvframe->pkt->len; i = i + 8) {
RT_TRACE(_module_rtl871x_recv_c_,
- _drv_err_,
- "0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
- *(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));
+ _drv_err_, "%*phC\n",
+ 8, precvframe->pkt->data + i);
}
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
"====== demp packet end [len =%d]======\n",
DBG_8723A("#############################\n");
for (i = 0; i < 64; i = i + 8)
- DBG_8723A("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n",
- *(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("%*phC:\n", 8, ptr + i);
DBG_8723A("#############################\n");
}
}
}
if (pBTInfo->BtAsocEntry[CurrentAssocNum].AMPRole == AMP_BTAP_CREATOR) {
- snprintf((char *)pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 32, "AMP-%02x-%02x-%02x-%02x-%02x-%02x",
- padapter->eeprompriv.mac_addr[0],
- 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]);
+ snprintf((char *)pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 32,
+ "AMP-%pMF", padapter->eeprompriv.mac_addr);
} else if (pBTInfo->BtAsocEntry[CurrentAssocNum].AMPRole == AMP_BTAP_JOINER) {
- snprintf((char *)pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 32, "AMP-%02x-%02x-%02x-%02x-%02x-%02x",
- pBTInfo->BtAsocEntry[CurrentAssocNum].BTRemoteMACAddr[0],
- 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]);
+ snprintf((char *)pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 32,
+ "AMP-%pMF", pBTInfo->BtAsocEntry[CurrentAssocNum].BTRemoteMACAddr);
}
FillOctetString(pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsid, pBTInfo->BtAsocEntry[CurrentAssocNum].BTSsidBuf, 21);
psTdmaCase = pHalData->bt_coexist.halCoex8723.btdm1Ant.curPsTdma;
else
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)", \
- pHalData->bt_coexist.fw3aVal[0], pHalData->bt_coexist.fw3aVal[1],
- pHalData->bt_coexist.fw3aVal[2], pHalData->bt_coexist.fw3aVal[3],
- pHalData->bt_coexist.fw3aVal[4], psTdmaCase);
+ snprintf(btCoexDbgBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %*ph case-%d",
+ "PS TDMA(0x3a)", 5, pHalData->bt_coexist.fw3aVal, psTdmaCase);
DCMD_Printf(btCoexDbgBuf);
snprintf(btCoexDbgBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d ", "Decrease Bt Power", \
}
RT_TRACE(_module_hci_hal_init_c_, _drv_notice_,
- "Hal_EfuseParseMACAddr_8723AU: Permanent Address =%02x:%02x:%02x:%02x:%02x:%02x\n",
- pEEPROM->mac_addr[0], pEEPROM->mac_addr[1],
- pEEPROM->mac_addr[2], pEEPROM->mac_addr[3],
- pEEPROM->mac_addr[4], pEEPROM->mac_addr[5]);
+ "Hal_EfuseParseMACAddr_8723AU: Permanent Address =%pM\n",
+ pEEPROM->mac_addr);
}
static void readAdapterInfo(struct rtw_adapter *padapter)