Skip to contentSkip to conversation

brcmfmac: use %*ph to print small buffer

PATCH In review Andy Shevchenko 2 participants 2 messages Jul 30, 2020 – Aug 18, 2020 Broadcom BRCM80211 IEEE802.11 wireless drivers

lore
Share & tools
lore
#0 lore raw

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

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

---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +1 -4
index 5d99771c3f64..a305567b41d0 100644
@@ -3983,10 +3983,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *ndev,
 	}
 
 	brcmf_dbg(CONN, "set_pmksa - PMK bssid: %pM =\n", pmk[npmk].bssid);
-	for (i = 0; i < WLAN_PMKID_LEN; i += 4)
-		brcmf_dbg(CONN, "%02x %02x %02x %02x\n", pmk[npmk].pmkid[i],
-			  pmk[npmk].pmkid[i + 1], pmk[npmk].pmkid[i + 2],
-			  pmk[npmk].pmkid[i + 3]);
+	brcmf_dbg(CONN, "%*ph\n", WLAN_PMKID_LEN, pmk[npmk].pmkid);
 
 	err = brcmf_update_pmklist(cfg, ifp);
 
Signature · 1 line
2.27.0
#1 lore raw
Quoted 3 lines · Andy Shevchenko

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

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

838933ca5b9c brcmfmac: use %*ph to print small buffer

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

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