mtd: st_spi_fsm: use %*ph to print small buffer
authorAntonio Cardace <anto.cardace@gmail.com>
Mon, 12 Feb 2018 18:41:30 +0000 (18:41 +0000)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Thu, 15 Mar 2018 16:20:37 +0000 (17:20 +0100)
Use %*ph format to print small buffer as hex string.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Antonio Cardace <anto.cardace@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/devices/st_spi_fsm.c

index 7bc29d7..a33f5fd 100644 (file)
@@ -1868,8 +1868,7 @@ static struct flash_info *stfsm_jedec_probe(struct stfsm *fsm)
         */
        ext_jedec = id[3] << 8  | id[4];
 
-       dev_dbg(fsm->dev, "JEDEC =  0x%08x [%02x %02x %02x %02x %02x]\n",
-               jedec, id[0], id[1], id[2], id[3], id[4]);
+       dev_dbg(fsm->dev, "JEDEC =  0x%08x [%5ph]\n", jedec, id);
 
        for (info = flash_types; info->name; info++) {
                if (info->jedec_id == jedec) {