Re: [PATCH 1/2] staging: rtl8723bs: change remaining printk to proper api
From: Dan Carpenter
Date: Tue Oct 15 2024 - 05:42:22 EST
On Mon, Oct 14, 2024 at 10:47:37PM -0300, Rodrigo Gobbi wrote:
> As part of TODO file for future work, use dyn debug api for
> remaining printk statements.
>
> Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@xxxxxxxxx>
> ---
> 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 | 10 ++++++----
> drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 +-
> 4 files changed, 14 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> index bbdd5fce28a1..58da34f125db 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> @@ -1870,10 +1870,10 @@ unsigned int OnAction_sa_query(struct adapter *padapter, union recv_frame *precv
> if (0) {
> int pp;
>
> - printk("pattrib->pktlen = %d =>", pattrib->pkt_len);
> + pr_debug("pattrib->pktlen = %d =>", pattrib->pkt_len);
> for (pp = 0; pp < pattrib->pkt_len; pp++)
> - printk(" %02x ", pframe[pp]);
> - printk("\n");
> + pr_debug(" %02x ", pframe[pp]);
> + pr_debug("\n");
No, this isn't right. You'd need to use a mix of dev_dbg() and pr_cont().
Basically in drivers it should always be dev_ printks except for pr_cont().
regards,
dan carpenter