* [PATCH] mtd: st_spi_fsm: use %*ph to print small buffer
@ 2018-02-12 18:41 Antonio Cardace
2018-03-16 14:20 ` Andy Shevchenko
2018-03-18 21:21 ` Boris Brezillon
0 siblings, 2 replies; 3+ messages in thread
From: Antonio Cardace @ 2018-02-12 18:41 UTC (permalink / raw)
To: boris.brezillon, cyrille.pitchen
Cc: linux-mtd, andriy.shevchenko, Antonio Cardace
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>
---
drivers/mtd/devices/st_spi_fsm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c
index 7bc29d725200..a33f5fd6818c 100644
--- a/drivers/mtd/devices/st_spi_fsm.c
+++ b/drivers/mtd/devices/st_spi_fsm.c
@@ -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) {
--
2.15.1.354.g95ec6b1b3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: st_spi_fsm: use %*ph to print small buffer
2018-02-12 18:41 [PATCH] mtd: st_spi_fsm: use %*ph to print small buffer Antonio Cardace
@ 2018-03-16 14:20 ` Andy Shevchenko
2018-03-18 21:21 ` Boris Brezillon
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2018-03-16 14:20 UTC (permalink / raw)
To: Antonio Cardace, boris.brezillon, cyrille.pitchen; +Cc: linux-mtd
On Mon, 2018-02-12 at 18:41 +0000, Antonio Cardace wrote:
> Use %*ph format to print small buffer as hex string.
>
Any comments so far?
> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Antonio Cardace <anto.cardace@gmail.com>
> ---
> drivers/mtd/devices/st_spi_fsm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/devices/st_spi_fsm.c
> b/drivers/mtd/devices/st_spi_fsm.c
> index 7bc29d725200..a33f5fd6818c 100644
> --- a/drivers/mtd/devices/st_spi_fsm.c
> +++ b/drivers/mtd/devices/st_spi_fsm.c
> @@ -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) {
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: st_spi_fsm: use %*ph to print small buffer
2018-02-12 18:41 [PATCH] mtd: st_spi_fsm: use %*ph to print small buffer Antonio Cardace
2018-03-16 14:20 ` Andy Shevchenko
@ 2018-03-18 21:21 ` Boris Brezillon
1 sibling, 0 replies; 3+ messages in thread
From: Boris Brezillon @ 2018-03-18 21:21 UTC (permalink / raw)
To: Antonio Cardace
Cc: boris.brezillon, cyrille.pitchen, linux-mtd, andriy.shevchenko
On Mon, 12 Feb 2018 18:41:30 +0000
Antonio Cardace <anto.cardace@gmail.com> wrote:
> Use %*ph format to print small buffer as hex string.
Applied.
Thanks,
Boris
>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Antonio Cardace <anto.cardace@gmail.com>
> ---
> drivers/mtd/devices/st_spi_fsm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c
> index 7bc29d725200..a33f5fd6818c 100644
> --- a/drivers/mtd/devices/st_spi_fsm.c
> +++ b/drivers/mtd/devices/st_spi_fsm.c
> @@ -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) {
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-18 21:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-12 18:41 [PATCH] mtd: st_spi_fsm: use %*ph to print small buffer Antonio Cardace
2018-03-16 14:20 ` Andy Shevchenko
2018-03-18 21:21 ` Boris Brezillon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.