linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: debugfs: fix format specifier
@ 2022-05-12 11:20 Michael Walle
  2022-05-12 12:32 ` Pratyush Yadav
  2022-05-12 13:10 ` Pratyush Yadav
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Walle @ 2022-05-12 11:20 UTC (permalink / raw)
  To: Tudor Ambarus, Pratyush Yadav, Michael Walle, Dan Carpenter
  Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	linux-mtd, linux-kernel, kernel test robot

The intention was to print the JEDEC ID in the following format:
  nn nn nn

In this case format specifier has to be "%*ph". Fix it.

Fixes: 0257be79fc4a ("mtd: spi-nor: expose internal parameters via debugfs")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michael Walle <michael@walle.cc>
---
 drivers/mtd/spi-nor/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/debugfs.c b/drivers/mtd/spi-nor/debugfs.c
index bf9fda5d4d0b..4b972bd4b80d 100644
--- a/drivers/mtd/spi-nor/debugfs.c
+++ b/drivers/mtd/spi-nor/debugfs.c
@@ -81,7 +81,7 @@ static int spi_nor_params_show(struct seq_file *s, void *data)
 	int i;
 
 	seq_printf(s, "name\t\t%s\n", info->name);
-	seq_printf(s, "id\t\t%*phn\n", SPI_NOR_MAX_ID_LEN, nor->id);
+	seq_printf(s, "id\t\t%*ph\n", SPI_NOR_MAX_ID_LEN, nor->id);
 	string_get_size(params->size, 1, STRING_UNITS_2, buf, sizeof(buf));
 	seq_printf(s, "size\t\t%s\n", buf);
 	seq_printf(s, "write size\t%u\n", params->writesize);
-- 
2.30.2


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mtd: spi-nor: debugfs: fix format specifier
  2022-05-12 11:20 [PATCH] mtd: spi-nor: debugfs: fix format specifier Michael Walle
@ 2022-05-12 12:32 ` Pratyush Yadav
  2022-05-12 12:34   ` Michael Walle
  2022-05-12 13:10 ` Pratyush Yadav
  1 sibling, 1 reply; 4+ messages in thread
From: Pratyush Yadav @ 2022-05-12 12:32 UTC (permalink / raw)
  To: Michael Walle
  Cc: Tudor Ambarus, Dan Carpenter, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd, linux-kernel, kernel test robot

Hi Michael,

On 12/05/22 01:20PM, Michael Walle wrote:
> The intention was to print the JEDEC ID in the following format:
>   nn nn nn
> 
> In this case format specifier has to be "%*ph". Fix it.
> 
> Fixes: 0257be79fc4a ("mtd: spi-nor: expose internal parameters via debugfs")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
>  drivers/mtd/spi-nor/debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/debugfs.c b/drivers/mtd/spi-nor/debugfs.c
> index bf9fda5d4d0b..4b972bd4b80d 100644
> --- a/drivers/mtd/spi-nor/debugfs.c
> +++ b/drivers/mtd/spi-nor/debugfs.c
> @@ -81,7 +81,7 @@ static int spi_nor_params_show(struct seq_file *s, void *data)
>  	int i;
>  
>  	seq_printf(s, "name\t\t%s\n", info->name);
> -	seq_printf(s, "id\t\t%*phn\n", SPI_NOR_MAX_ID_LEN, nor->id);
> +	seq_printf(s, "id\t\t%*ph\n", SPI_NOR_MAX_ID_LEN, nor->id);

Patch does not apply. Are you basing this on some other commits you 
have? This line is different on my tree:

	seq_printf(s, "id\t\t%*phn\n", info->id_len, info->id);

In fact, I do not have a nor->id at all in my tree. BTW, I have applied 
https://lore.kernel.org/r/20220429102018.2361038-2-michael@walle.cc

I am going to apply the below patch. Please ACK/NACK. I did a quick 
test, the output stays the same before and after this patch.

-- 8< --
From c47452194641b5d27c20e557c84a46c85fd7ce37 Mon Sep 17 00:00:00 2001
From: Michael Walle <michael@walle.cc>
Date: Thu, 12 May 2022 13:20:27 +0200
Subject: [PATCH] mtd: spi-nor: debugfs: fix format specifier

The intention was to print the JEDEC ID in the following format:
  nn nn nn

In this case format specifier has to be "%*ph". Fix it.

Fixes: 0257be79fc4a ("mtd: spi-nor: expose internal parameters via debugfs")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20220512112027.3771734-1-michael@walle.cc
---
 drivers/mtd/spi-nor/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/debugfs.c b/drivers/mtd/spi-nor/debugfs.c
index 1949905eefea..eaf84f7a0676 100644
--- a/drivers/mtd/spi-nor/debugfs.c
+++ b/drivers/mtd/spi-nor/debugfs.c
@@ -81,7 +81,7 @@ static int spi_nor_params_show(struct seq_file *s, void *data)
 	int i;
 
 	seq_printf(s, "name\t\t%s\n", info->name);
-	seq_printf(s, "id\t\t%*phn\n", info->id_len, info->id);
+	seq_printf(s, "id\t\t%*ph\n", info->id_len, info->id);
 	string_get_size(params->size, 1, STRING_UNITS_2, buf, sizeof(buf));
 	seq_printf(s, "size\t\t%s\n", buf);
 	seq_printf(s, "write size\t%u\n", params->writesize);

-- 
Regards,
Pratyush Yadav
Texas Instruments Inc.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mtd: spi-nor: debugfs: fix format specifier
  2022-05-12 12:32 ` Pratyush Yadav
@ 2022-05-12 12:34   ` Michael Walle
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Walle @ 2022-05-12 12:34 UTC (permalink / raw)
  To: Pratyush Yadav
  Cc: Tudor Ambarus, Dan Carpenter, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, linux-mtd, linux-kernel, kernel test robot

Am 2022-05-12 14:32, schrieb Pratyush Yadav:
> Hi Michael,
> 
> On 12/05/22 01:20PM, Michael Walle wrote:
>> The intention was to print the JEDEC ID in the following format:
>>   nn nn nn
>> 
>> In this case format specifier has to be "%*ph". Fix it.
>> 
>> Fixes: 0257be79fc4a ("mtd: spi-nor: expose internal parameters via 
>> debugfs")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>> Signed-off-by: Michael Walle <michael@walle.cc>
>> ---
>>  drivers/mtd/spi-nor/debugfs.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/mtd/spi-nor/debugfs.c 
>> b/drivers/mtd/spi-nor/debugfs.c
>> index bf9fda5d4d0b..4b972bd4b80d 100644
>> --- a/drivers/mtd/spi-nor/debugfs.c
>> +++ b/drivers/mtd/spi-nor/debugfs.c
>> @@ -81,7 +81,7 @@ static int spi_nor_params_show(struct seq_file *s, 
>> void *data)
>>  	int i;
>> 
>>  	seq_printf(s, "name\t\t%s\n", info->name);
>> -	seq_printf(s, "id\t\t%*phn\n", SPI_NOR_MAX_ID_LEN, nor->id);
>> +	seq_printf(s, "id\t\t%*ph\n", SPI_NOR_MAX_ID_LEN, nor->id);
> 
> Patch does not apply. Are you basing this on some other commits you
> have? This line is different on my tree:
> 
> 	seq_printf(s, "id\t\t%*phn\n", info->id_len, info->id);
> 
> In fact, I do not have a nor->id at all in my tree. BTW, I have applied
> https://lore.kernel.org/r/20220429102018.2361038-2-michael@walle.cc
> 
> I am going to apply the below patch. Please ACK/NACK. I did a quick
> test, the output stays the same before and after this patch.
> 
> -- 8< --
> From c47452194641b5d27c20e557c84a46c85fd7ce37 Mon Sep 17 00:00:00 2001
> From: Michael Walle <michael@walle.cc>
> Date: Thu, 12 May 2022 13:20:27 +0200
> Subject: [PATCH] mtd: spi-nor: debugfs: fix format specifier
> 
> The intention was to print the JEDEC ID in the following format:
>   nn nn nn
> 
> In this case format specifier has to be "%*ph". Fix it.
> 
> Fixes: 0257be79fc4a ("mtd: spi-nor: expose internal parameters via 
> debugfs")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Michael Walle <michael@walle.cc>
> Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
> Link: 
> https://lore.kernel.org/r/20220512112027.3771734-1-michael@walle.cc
> ---
>  drivers/mtd/spi-nor/debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/debugfs.c 
> b/drivers/mtd/spi-nor/debugfs.c
> index 1949905eefea..eaf84f7a0676 100644
> --- a/drivers/mtd/spi-nor/debugfs.c
> +++ b/drivers/mtd/spi-nor/debugfs.c
> @@ -81,7 +81,7 @@ static int spi_nor_params_show(struct seq_file *s, 
> void *data)
>  	int i;
> 
>  	seq_printf(s, "name\t\t%s\n", info->name);
> -	seq_printf(s, "id\t\t%*phn\n", info->id_len, info->id);
> +	seq_printf(s, "id\t\t%*ph\n", info->id_len, info->id);
>  	string_get_size(params->size, 1, STRING_UNITS_2, buf, sizeof(buf));
>  	seq_printf(s, "size\t\t%s\n", buf);
>  	seq_printf(s, "write size\t%u\n", params->writesize);

Ack. Thanks. My bad, there are some missing changes, which I didn't
sent yet.

-michael

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mtd: spi-nor: debugfs: fix format specifier
  2022-05-12 11:20 [PATCH] mtd: spi-nor: debugfs: fix format specifier Michael Walle
  2022-05-12 12:32 ` Pratyush Yadav
@ 2022-05-12 13:10 ` Pratyush Yadav
  1 sibling, 0 replies; 4+ messages in thread
From: Pratyush Yadav @ 2022-05-12 13:10 UTC (permalink / raw)
  To: Tudor Ambarus, Dan Carpenter, Michael Walle
  Cc: linux-kernel, linux-mtd, kernel test robot, Vignesh Raghavendra,
	Richard Weinberger, Miquel Raynal

On Thu, 12 May 2022 13:20:27 +0200, Michael Walle wrote:
> The intention was to print the JEDEC ID in the following format:
>   nn nn nn
> 
> In this case format specifier has to be "%*ph". Fix it.
> 
> 

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-nor/next, thanks!
[1/1] mtd: spi-nor: debugfs: fix format specifier
      https://git.kernel.org/mtd/c/c474521946

--
Regards,
Pratyush Yadav
Texas Instruments Inc.


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-12 13:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 11:20 [PATCH] mtd: spi-nor: debugfs: fix format specifier Michael Walle
2022-05-12 12:32 ` Pratyush Yadav
2022-05-12 12:34   ` Michael Walle
2022-05-12 13:10 ` Pratyush Yadav

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).