All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: rtw89: fix a width vs precision bug
@ 2023-08-08  5:36 Dan Carpenter
  2023-08-08  8:30 ` Ping-Ke Shih
  2023-08-21 16:14 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2023-08-08  5:36 UTC (permalink / raw)
  To: Chin-Yen Lee; +Cc: Ping-Ke Shih, Kalle Valo, linux-wireless, kernel-janitors

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@linaro.org>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH] wifi: rtw89: fix a width vs precision bug
  2023-08-08  5:36 [PATCH] wifi: rtw89: fix a width vs precision bug Dan Carpenter
@ 2023-08-08  8:30 ` Ping-Ke Shih
  2023-08-21 16:05   ` Kalle Valo
  2023-08-21 16:14 ` Kalle Valo
  1 sibling, 1 reply; 4+ messages in thread
From: Ping-Ke Shih @ 2023-08-08  8:30 UTC (permalink / raw)
  To: Dan Carpenter, Timlee
  Cc: Kalle Valo, linux-wireless@vger.kernel.org,
	kernel-janitors@vger.kernel.org



> -----Original Message-----
> From: Dan Carpenter <dan.carpenter@linaro.org>
> Sent: Tuesday, August 8, 2023 1:36 PM
> To: Timlee <timlee@realtek.com>
> Cc: Ping-Ke Shih <pkshih@realtek.com>; Kalle Valo <kvalo@kernel.org>; linux-wireless@vger.kernel.org;
> kernel-janitors@vger.kernel.org
> 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@linaro.org>

Thanks for the fix. 

Acked-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
>  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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] wifi: rtw89: fix a width vs precision bug
  2023-08-08  8:30 ` Ping-Ke Shih
@ 2023-08-21 16:05   ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2023-08-21 16:05 UTC (permalink / raw)
  To: Ping-Ke Shih
  Cc: Dan Carpenter, Timlee, linux-wireless@vger.kernel.org,
	kernel-janitors@vger.kernel.org

Ping-Ke Shih <pkshih@realtek.com> writes:

>> -----Original Message-----
>> From: Dan Carpenter <dan.carpenter@linaro.org>
>> Sent: Tuesday, August 8, 2023 1:36 PM
>> To: Timlee <timlee@realtek.com>
>> Cc: Ping-Ke Shih <pkshih@realtek.com>; Kalle Valo
>> <kvalo@kernel.org>; linux-wireless@vger.kernel.org;
>> kernel-janitors@vger.kernel.org
>> 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@linaro.org>
>
> Thanks for the fix. 
>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

Weird, Ping's reply didn't go to patchwork:

https://patchwork.kernel.org/project/linux-wireless/patch/0700c7b9-bfd3-4aa6-82bf-5bf3c74644e1@moroto.mountain/

But I do see it on the list:

https://lore.kernel.org/all/63f8219b49604fc9805319c391ee44bf@realtek.com/

Crossing fingers that this was just a random anomaly in patchwork and
it's not losing more email.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] wifi: rtw89: fix a width vs precision bug
  2023-08-08  5:36 [PATCH] wifi: rtw89: fix a width vs precision bug Dan Carpenter
  2023-08-08  8:30 ` Ping-Ke Shih
@ 2023-08-21 16:14 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2023-08-21 16:14 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Chin-Yen Lee, Ping-Ke Shih, linux-wireless, kernel-janitors

Dan Carpenter <dan.carpenter@linaro.org> wrote:

> 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@linaro.org>

Patch applied to wireless-next.git, thanks.

e2a61151ff8c wifi: rtw89: fix a width vs precision bug

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/0700c7b9-bfd3-4aa6-82bf-5bf3c74644e1@moroto.mountain/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-21 16:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-08  5:36 [PATCH] wifi: rtw89: fix a width vs precision bug Dan Carpenter
2023-08-08  8:30 ` Ping-Ke Shih
2023-08-21 16:05   ` Kalle Valo
2023-08-21 16:14 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.