Skip to contentSkip to conversation

rtlwifi: btcoex: use %*ph to print small buffer

PATCH In review Andy Shevchenko 3 participants 3 messages Jul 30, 2020 – Aug 2, 2020 Realtek wireless driver (rtlwifi family)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtlwifi: btcoex: use %*ph to print small buffer

Use %*ph format to print small buffer as hex string.

---
 .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c   | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +2 -4
index a4940a3842de..0850c5ddad14 100644
@@ -894,11 +894,9 @@ static void halbtc_display_wifi_status(struct btc_coexist *btcoexist,
 		   (low_power ? ", 32k" : ""));
 
 	seq_printf(m,
-		   "\n %-35s = %02x %02x %02x %02x %02x %02x (0x%x/0x%x)",
+		   "\n %-35s = %6ph (0x%x/0x%x)",
 		   "Power mode cmd(lps/rpwm)",
-		   btcoexist->pwr_mode_val[0], btcoexist->pwr_mode_val[1],
-		   btcoexist->pwr_mode_val[2], btcoexist->pwr_mode_val[3],
-		   btcoexist->pwr_mode_val[4], btcoexist->pwr_mode_val[5],
+		   btcoexist->pwr_mode_val,
 		   btcoexist->bt_info.lps_val,
 		   btcoexist->bt_info.rpwm_val);
 }
Signature · 1 line
2.27.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Andy Shevchenko

Use %*ph format to print small buffer as hex string.

Quoted 27 lines

---
 .../net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c   | 6 ++----

 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +0 -0
index a4940a3842de..0850c5ddad14 100644
@@ -894,11 +894,9 @@ static void halbtc_display_wifi_status(struct btc_coexist
 *btcoexist,
  		   (low_power ? ", 32k" : ""));


  seq_printf(m,

drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +1 -1
-		   "\n %-35s = %02x %02x %02x %02x %02x %02x (0x%x/0x%x)",
+		   "\n %-35s = %6ph (0x%x/0x%x)",

     "Power mode cmd(lps/rpwm)",

drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +1 -3
-		   btcoexist->pwr_mode_val[0], btcoexist->pwr_mode_val[1],
-		   btcoexist->pwr_mode_val[2], btcoexist->pwr_mode_val[3],
-		   btcoexist->pwr_mode_val[4], btcoexist->pwr_mode_val[5],
+		   btcoexist->pwr_mode_val,

     btcoexist->bt_info.lps_val,
     btcoexist->bt_info.rpwm_val);
 }
--
2.27.0

#2 lore raw
In reply to Andy Shevchenko
Quoted 4 lines · Andy Shevchenko

Use %*ph format to print small buffer as hex string.

Patch applied to wireless-drivers-next.git, thanks.

1751a7352b63 rtlwifi: btcoex: use %*ph to print small buffer

Signature · 3 lines
https://patchwork.kernel.org/patch/11693311/

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