brcmfmac: use %*ph to print small buffer
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 30 Jul 2020 15:53:27 +0000 (18:53 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 18 Aug 2020 12:48:34 +0000 (15:48 +0300)
Use %*ph format to print small buffer as hex string.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200730155327.40130-1-andriy.shevchenko@linux.intel.com
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

index ab0da2f..444639f 100644 (file)
@@ -3991,10 +3991,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);