mtd: st_spi_fsm: use %*ph to print small buffer
PATCH 1/1 mtd: st_spi_fsm: use %*ph to print small buffer
Use %*ph format to print small buffer as hex string.
Suggested-by Andy Shevchenko <[email protected]>
Signed-off-by Antonio Cardace <[email protected]>
--- drivers/mtd/devices/st_spi_fsm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mtd/devices/st_spi_fsm.c +1 -2
@@ -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) {
Signature · 1 line
2.15.1.354.g95ec6b1b3
Quoted 2 lines · Antonio Cardace
Use %*ph format to print small buffer as hex string.
Any comments so far?
Quoted 23 lines
Suggested-by Andy Shevchenko <[email protected]>Signed-off-by Antonio Cardace <[email protected]>--- drivers/mtd/devices/st_spi_fsm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/mtd/devices/st_spi_fsm.c +1
-2@@ -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);drivers/mtd/devices/st_spi_fsm.c +0
-0for (info = flash_types; info->name; info++) {if (info->jedec_id == jedec) {
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Boris Brezillon
AppliedQuoted 1 line · On Mon, 12 Feb 2018 18:41:30 +0000 Antonio Cardace <[email protected]>…
Use %*ph format to print small buffer as hex string.
Applied.
Thanks,
Boris
Quoted 21 lines
Suggested-by Andy Shevchenko <[email protected]>Signed-off-by Antonio Cardace <[email protected]>--- drivers/mtd/devices/st_spi_fsm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/mtd/devices/st_spi_fsm.c +1
-2@@ -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) {
Signature · 3 lines
Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com