[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260130185658.207785-5-lukagejak5@gmail.com>
Date: Fri, 30 Jan 2026 19:56:57 +0100
From: Luka Gejak <lukagejak5@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Dan Carpenter <dan.carpenter@...aro.org>,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Luka Gejak <lukagejak5@...il.com>
Subject: [PATCH v6 4/5] 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@...il.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 7dfc2678924e..5e79a720710f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -2071,7 +2071,7 @@ static int rtw_append_pmkid(struct adapter *Adapter, int iEntry, u8 *ie, uint ie
static void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
{
uint len;
- u8 *buff, *p, i;
+ u8 *buff, *p;
union iwreq_data wrqu;
buff = NULL;
@@ -2087,8 +2087,7 @@ static void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
len = sec_ie[1] + 2;
len = (len < IW_CUSTOM_MAX) ? len : IW_CUSTOM_MAX;
- for (i = 0; i < len; i++)
- p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), "%02x", sec_ie[i]);
+ p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), " %*ph", len, sec_ie);
p += scnprintf(p, IW_CUSTOM_MAX - (p - buff), ")");
--
2.52.0
Powered by blists - more mailing lists