mtd: nftl: use %*ph to print small buffer
authorAntonio Cardace <anto.cardace@gmail.com>
Tue, 13 Feb 2018 17:52:45 +0000 (17:52 +0000)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Wed, 21 Mar 2018 08:50:56 +0000 (09:50 +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/nftlmount.c

index d8f6dba01c8747ece0a238a5a764d52f5bc55320..a6fbfa4e57999d9717286f2647333f34137ccb57 100644 (file)
@@ -122,8 +122,7 @@ static int find_boot_record(struct NFTLrecord *nftl)
                if (memcmp(buf, "ANAND", 6)) {
                        printk(KERN_NOTICE "ANAND header found at 0x%x in mtd%d, but went away on reread!\n",
                               block * nftl->EraseSize, nftl->mbd.mtd->index);
-                       printk(KERN_NOTICE "New data are: %02x %02x %02x %02x %02x %02x\n",
-                              buf[0], buf[1], buf[2], buf[3], buf[4], buf[5]);
+                       printk(KERN_NOTICE "New data are: %6ph\n", buf);
                        continue;
                }
 #endif