Re: [PATCH] mtd: spi-nor: debugfs: fix format specifier

From: Pratyush Yadav
Date: Thu May 12 2022 - 08:32:44 EST


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@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Michael Walle <michael@xxxxxxxx>
> ---
> 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@xxxxxxxx

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