hostap: use %*ph to print small buffer
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 4 Sep 2019 17:43:21 +0000 (20:43 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 6 Sep 2019 14:12:02 +0000 (17:12 +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>
drivers/net/wireless/intersil/hostap/hostap_download.c
drivers/net/wireless/intersil/hostap/hostap_plx.c

index 4507614a7c5a0385591e79dd5c498c2c450e4b80..8722000b6c27e17f789b1d98e2d5176da1419d38 100644 (file)
@@ -407,10 +407,8 @@ static int prism2_enable_genesis(local_info_t *local, int hcr)
                       hcr);
                return 0;
        } else {
-               printk(KERN_DEBUG "Readback test failed, HCR 0x%02x "
-                      "write %02x %02x %02x %02x read %02x %02x %02x %02x\n",
-                      hcr, initseq[0], initseq[1], initseq[2], initseq[3],
-                      readbuf[0], readbuf[1], readbuf[2], readbuf[3]);
+               printk(KERN_DEBUG "Readback test failed, HCR 0x%02x write %4ph read %4ph\n",
+                      hcr, initseq, readbuf);
                return 1;
        }
 }
index 943070d39b1eb93e52290055d040c8c3309de3a7..841cfc68ce84044cb75a664ed8cfe180225030cf 100644 (file)
@@ -352,8 +352,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len,
        /* read CIS; it is in even offsets in the beginning of attr_mem */
        for (i = 0; i < CIS_MAX_LEN; i++)
                cis[i] = readb(attr_mem + 2 * i);
-       printk(KERN_DEBUG "%s: CIS: %02x %02x %02x %02x %02x %02x ...\n",
-              dev_info, cis[0], cis[1], cis[2], cis[3], cis[4], cis[5]);
+       printk(KERN_DEBUG "%s: CIS: %6ph ...\n", dev_info, cis);
 
        /* set reasonable defaults for Prism2 cards just in case CIS parsing
         * fails */