Search Linux Wireless

RE: [PATCH] wifi: rtw89: fix a width vs precision bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Sent: Tuesday, August 8, 2023 1:36 PM
> To: Timlee <timlee@xxxxxxxxxxx>
> Cc: Ping-Ke Shih <pkshih@xxxxxxxxxxx>; Kalle Valo <kvalo@xxxxxxxxxx>; linux-wireless@xxxxxxxxxxxxxxx;
> kernel-janitors@xxxxxxxxxxxxxxx
> Subject: [PATCH] wifi: rtw89: fix a width vs precision bug
> 
> The "buf" is skb->data that comes from the firmware.  We want to print
> "len" number of bytes.  But there is a missing period so the "len"
> variable is used for formatting (width) instead of limiting the output
> (precision).
> 
> Fixes: cad2bd8a136c ("wifi: rtw89: support firmware log with formatted text")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Thanks for the fix. 

Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>

> ---
>  drivers/net/wireless/realtek/rtw89/fw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
> index 2811a94b5f69..bcd9050f989f 100644
> --- a/drivers/net/wireless/realtek/rtw89/fw.c
> +++ b/drivers/net/wireless/realtek/rtw89/fw.c
> @@ -1165,7 +1165,7 @@ void rtw89_fw_log_dump(struct rtw89_dev *rtwdev, u8 *buf, u32 len)
>         return;
> 
>  plain_log:
> -       rtw89_info(rtwdev, "C2H log: %*s", len, buf);
> +       rtw89_info(rtwdev, "C2H log: %.*s", len, buf);
> 
>  }
> 
> --
> 2.39.2
> 
> 
> ------Please consider the environment before printing this e-mail.



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux