staging: rtl8723bs: change remaining printk to proper api
PATCH v4 1/1 staging: rtl8723bs: change remaining printk to proper api
As part of TODO file for future work, use dyn debug api for remaining printk statements.
---
The previous discussion about broken code with -DDBG_RX_SIGNAL_DISPLAY_RAW_DATA and
a unused function will be submitted in future patches.
Tks and regards.
---
Changelog
v4 a few more replacements/remove debug line as suggested;
v3 https://lore.kernel.org/linux-staging/[email protected]/T/#med344b7d344044851e1c96d498512c907d8be0ab
v2 https://lore.kernel.org/linux-staging/[email protected]/T/#m4c2796a796d7e5b456975365147c51d7977e9e81
v1 https://lore.kernel.org/lkml/2024101608-daycare-exterior-31fd@gregkh/T/#m1b2b4fdb8a5eec605983c12ca211d394b66cc79f
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 6 +++--- drivers/staging/rtl8723bs/hal/hal_com.c | 7 +++---- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 12 ++++++++---- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +3 -3
@@ -1870,10 +1870,10 @@ unsigned int OnAction_sa_query(struct adapter *padapter, union recv_frame *precvif (0 ) {int pp; -printk ("pattrib->pktlen = %d =>" , pattrib->pkt_len); +netdev_dbg (padapter->pnetdev,"pattrib->pktlen = %d =>" , pattrib->pkt_len);for (pp =0 ; pp < pattrib->pkt_len; pp++) -printk (" %02x " , pframe[pp]); -printk ("\n" ); +pr_cont (" %02x " , pframe[pp]); +pr_cont ("\n" ); }return _SUCCESS;
drivers/staging/rtl8723bs/hal/hal_com.c +3 -4
@@ -909,10 +909,9 @@ void rtw_dump_raw_rssi_info(struct adapter *padapter)for (rf_path =0 ; rf_path < pHalData->NumTotalRFPath; rf_path++) {if (!isCCKrate) { -printk (", rx_ofdm_pwr:%d(dBm), rx_ofdm_snr:%d(dB)\n" , - psample_pkt_rssi->ofdm_pwr[rf_path], psample_pkt_rssi->ofdm_snr[rf_path]); - }else { -printk ("\n" ); +netdev_dbg (padapter->pnetdev,", rx_ofdm_pwr:%d(dBm), rx_ofdm_snr:%d(dB)\n" , + psample_pkt_rssi->ofdm_pwr[rf_path], + psample_pkt_rssi->ofdm_snr[rf_path]); } } }
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +8 -4
@@ -60,7 +60,8 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize)for (i =0 ; i < blockCount_p1; i++) { ret =rtw_write32 (padapter, (FW_8723B_START_ADDRESS + i * blockSize_p1), *((u32 *)(bufferPtr + i * blockSize_p1)));if (ret == _FAIL) { -printk ("====>%s %d i:%d\n" , __func__, __LINE__, i); +netdev_dbg (padapter->pnetdev,"write failed at %s %d, block:%d\n" , + __func__, __LINE__, i); goto exit; } }
@@ -83,7 +84,8 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize) ret =rtw_write8 (padapter, (FW_8723B_START_ADDRESS + offset + i), *(bufferPtr + offset + i));if (ret == _FAIL) { -printk ("====>%s %d i:%d\n" , __func__, __LINE__, i); +netdev_dbg (padapter->pnetdev,"write failed at %s %d, block:%d\n" , + __func__, __LINE__, i); goto exit; } }
@@ -125,7 +127,8 @@ static int _WriteFW(struct adapter *padapter, void *buffer, u32 size) ret =_PageWrite (padapter, page, bufferPtr+offset,MAX_DLFW_PAGE_SIZE );if (ret == _FAIL) { -printk ("====>%s %d\n" , __func__, __LINE__); +netdev_dbg (padapter->pnetdev,"page write failed at %s %d\n" , + __func__, __LINE__); goto exit; } }
@@ -136,7 +139,8 @@ static int _WriteFW(struct adapter *padapter, void *buffer, u32 size) ret =_PageWrite (padapter, page, bufferPtr+offset, remainSize);if (ret == _FAIL) { -printk ("====>%s %d\n" , __func__, __LINE__); +netdev_dbg (padapter->pnetdev,"remaining page write failed at %s %d\n" , + __func__, __LINE__); goto exit; } }
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +1 -1
@@ -72,7 +72,7 @@ static int sdio_alloc_irq(struct dvobj_priv *dvobj) err =sdio_claim_irq (func, &sd_sync_int_hdl);if (err) { dvobj->drv_dbg.dbg_sdio_alloc_irq_error_cnt++; -printk (KERN_CRIT "%s: sdio_claim_irq FAIL(%d)!\n" , __func__, err); +netdev_crit (dvobj->if1->pnetdev,"%s: sdio_claim_irq FAIL(%d)!\n" , __func__, err); }else { dvobj->drv_dbg.dbg_sdio_alloc_irq_cnt++; dvobj->irq_alloc =1 ;
Signature · 1 line
2.34.1
Quoted 5 lines · Rodrigo Gobbi
As part of TODO file for future work, use dyn debug api for remaining printk statements.
Signed-off-by Rodrigo Gobbi <[email protected]>---
Looks good. Thanks.
regards,
dan carpenter