Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

staging: rtl8723bs: modernize hex output in rtw_report_sec_ie

Replace the manual hex-printing loop with the standard kernel '%*ph'
format string. This simplifies the code and uses modern logging
practices.

Signed-off-by: Luka Gejak <lukagejak5@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20260130185658.207785-5-lukagejak5@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Luka Gejak and committed by
Greg Kroah-Hartman
3db12482 908c03bf

+2 -3
+2 -3
drivers/staging/rtl8723bs/core/rtw_mlme.c
··· 2055 2055 static void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie) 2056 2056 { 2057 2057 uint len; 2058 - u8 *buff, *p, i; 2058 + u8 *buff, *p; 2059 2059 union iwreq_data wrqu; 2060 2060 2061 2061 buff = NULL; ··· 2071 2071 len = sec_ie[1] + 2; 2072 2072 len = (len < IW_CUSTOM_MAX) ? len : IW_CUSTOM_MAX; 2073 2073 2074 - for (i = 0; i < len; i++) 2075 - p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), "%02x", sec_ie[i]); 2074 + p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), " %*ph", len, sec_ie); 2076 2075 2077 2076 p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), ")"); 2078 2077