* [PATCH] mtd: nftl: use %*ph to print small buffer
@ 2018-02-13 17:52 Antonio Cardace
2018-03-16 14:20 ` Andy Shevchenko
2018-03-18 21:23 ` Boris Brezillon
0 siblings, 2 replies; 3+ messages in thread
From: Antonio Cardace @ 2018-02-13 17:52 UTC (permalink / raw)
To: boris.brezillon; +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>
---
What about this one?
drivers/mtd/nftlmount.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c
index 184c8fbfe465..a8bdc1455b50 100644
--- a/drivers/mtd/nftlmount.c
+++ b/drivers/mtd/nftlmount.c
@@ -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
--
2.15.1.354.g95ec6b1b3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: nftl: use %*ph to print small buffer
2018-02-13 17:52 [PATCH] mtd: nftl: use %*ph to print small buffer Antonio Cardace
@ 2018-03-16 14:20 ` Andy Shevchenko
2018-03-18 21:23 ` 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; +Cc: linux-mtd
On Tue, 2018-02-13 at 17:52 +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/nftlmount.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c
> index 184c8fbfe465..a8bdc1455b50 100644
> --- a/drivers/mtd/nftlmount.c
> +++ b/drivers/mtd/nftlmount.c
> @@ -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
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: nftl: use %*ph to print small buffer
2018-02-13 17:52 [PATCH] mtd: nftl: use %*ph to print small buffer Antonio Cardace
2018-03-16 14:20 ` Andy Shevchenko
@ 2018-03-18 21:23 ` Boris Brezillon
1 sibling, 0 replies; 3+ messages in thread
From: Boris Brezillon @ 2018-03-18 21:23 UTC (permalink / raw)
To: Antonio Cardace; +Cc: boris.brezillon, linux-mtd, andriy.shevchenko
On Tue, 13 Feb 2018 17:52:45 +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>
> ---
> What about this one?
>
> drivers/mtd/nftlmount.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c
> index 184c8fbfe465..a8bdc1455b50 100644
> --- a/drivers/mtd/nftlmount.c
> +++ b/drivers/mtd/nftlmount.c
> @@ -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
--
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:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 17:52 [PATCH] mtd: nftl: use %*ph to print small buffer Antonio Cardace
2018-03-16 14:20 ` Andy Shevchenko
2018-03-18 21:23 ` Boris Brezillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).