* [mtd:spi-nor/next 16/18] drivers/mtd/spi-nor/debugfs.c:84 spi_nor_params_show() warn: '%ph' cannot be followed by 'n'
@ 2022-05-11 10:17 Dan Carpenter
2022-05-11 11:35 ` Michael Walle
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2022-05-11 10:17 UTC (permalink / raw)
To: kbuild, Michael Walle; +Cc: lkp, kbuild-all, linux-kernel, Pratyush Yadav
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-nor/next
head: cdbc44dbb2c73d8bafa1a8ae0d780608be5dbd40
commit: 0257be79fc4a16a3252ce80aa13b3640f728c425 [16/18] mtd: spi-nor: expose internal parameters via debugfs
config: x86_64-randconfig-m001-20220509 (https://download.01.org/0day-ci/archive/20220511/202205110320.WNi7ZQaB-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/mtd/spi-nor/debugfs.c:84 spi_nor_params_show() warn: '%ph' cannot be followed by 'n'
vim +84 drivers/mtd/spi-nor/debugfs.c
0257be79fc4a16 Michael Walle 2022-04-29 73 static int spi_nor_params_show(struct seq_file *s, void *data)
0257be79fc4a16 Michael Walle 2022-04-29 74 {
0257be79fc4a16 Michael Walle 2022-04-29 75 struct spi_nor *nor = s->private;
0257be79fc4a16 Michael Walle 2022-04-29 76 struct spi_nor_flash_parameter *params = nor->params;
0257be79fc4a16 Michael Walle 2022-04-29 77 struct spi_nor_erase_map *erase_map = ¶ms->erase_map;
0257be79fc4a16 Michael Walle 2022-04-29 78 struct spi_nor_erase_region *region;
0257be79fc4a16 Michael Walle 2022-04-29 79 const struct flash_info *info = nor->info;
0257be79fc4a16 Michael Walle 2022-04-29 80 char buf[16], *str;
0257be79fc4a16 Michael Walle 2022-04-29 81 int i;
0257be79fc4a16 Michael Walle 2022-04-29 82
0257be79fc4a16 Michael Walle 2022-04-29 83 seq_printf(s, "name\t\t%s\n", info->name);
0257be79fc4a16 Michael Walle 2022-04-29 @84 seq_printf(s, "id\t\t%*phn\n", info->id_len, info->id);
Maybe N was intended instead of n? (I have no idea).
0257be79fc4a16 Michael Walle 2022-04-29 85 string_get_size(params->size, 1, STRING_UNITS_2, buf, sizeof(buf));
0257be79fc4a16 Michael Walle 2022-04-29 86 seq_printf(s, "size\t\t%s\n", buf);
0257be79fc4a16 Michael Walle 2022-04-29 87 seq_printf(s, "write size\t%u\n", params->writesize);
0257be79fc4a16 Michael Walle 2022-04-29 88 seq_printf(s, "page size\t%u\n", params->page_size);
0257be79fc4a16 Michael Walle 2022-04-29 89 seq_printf(s, "address width\t%u\n", nor->addr_width);
0257be79fc4a16 Michael Walle 2022-04-29 90
0257be79fc4a16 Michael Walle 2022-04-29 91 seq_puts(s, "flags\t\t");
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [mtd:spi-nor/next 16/18] drivers/mtd/spi-nor/debugfs.c:84 spi_nor_params_show() warn: '%ph' cannot be followed by 'n'
2022-05-11 10:17 [mtd:spi-nor/next 16/18] drivers/mtd/spi-nor/debugfs.c:84 spi_nor_params_show() warn: '%ph' cannot be followed by 'n' Dan Carpenter
@ 2022-05-11 11:35 ` Michael Walle
0 siblings, 0 replies; 2+ messages in thread
From: Michael Walle @ 2022-05-11 11:35 UTC (permalink / raw)
To: Dan Carpenter; +Cc: kbuild, lkp, kbuild-all, linux-kernel, Pratyush Yadav
Am 2022-05-11 12:17, schrieb Dan Carpenter:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
> spi-nor/next
> head: cdbc44dbb2c73d8bafa1a8ae0d780608be5dbd40
> commit: 0257be79fc4a16a3252ce80aa13b3640f728c425 [16/18] mtd: spi-nor:
> expose internal parameters via debugfs
> config: x86_64-randconfig-m001-20220509
> (https://download.01.org/0day-ci/archive/20220511/202205110320.WNi7ZQaB-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> smatch warnings:
> drivers/mtd/spi-nor/debugfs.c:84 spi_nor_params_show() warn: '%ph'
> cannot be followed by 'n'
>
> vim +84 drivers/mtd/spi-nor/debugfs.c
>
> 0257be79fc4a16 Michael Walle 2022-04-29 73 static int
> spi_nor_params_show(struct seq_file *s, void *data)
> 0257be79fc4a16 Michael Walle 2022-04-29 74 {
> 0257be79fc4a16 Michael Walle 2022-04-29 75 struct spi_nor *nor =
> s->private;
> 0257be79fc4a16 Michael Walle 2022-04-29 76 struct
> spi_nor_flash_parameter *params = nor->params;
> 0257be79fc4a16 Michael Walle 2022-04-29 77 struct
> spi_nor_erase_map *erase_map = ¶ms->erase_map;
> 0257be79fc4a16 Michael Walle 2022-04-29 78 struct
> spi_nor_erase_region *region;
> 0257be79fc4a16 Michael Walle 2022-04-29 79 const struct flash_info
> *info = nor->info;
> 0257be79fc4a16 Michael Walle 2022-04-29 80 char buf[16], *str;
> 0257be79fc4a16 Michael Walle 2022-04-29 81 int i;
> 0257be79fc4a16 Michael Walle 2022-04-29 82
> 0257be79fc4a16 Michael Walle 2022-04-29 83 seq_printf(s,
> "name\t\t%s\n", info->name);
> 0257be79fc4a16 Michael Walle 2022-04-29 @84 seq_printf(s,
> "id\t\t%*phn\n", info->id_len, info->id);
>
> Maybe N was intended instead of n? (I have no idea).
Thanks for reporting. Yeah I had %*phN previously but then
I wanted to switch to "xx xx xx" style and i missed checking
printk-formats.rst. %*phn worked as intended ;) I'll send
a fixup patch.
-michael
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-11 11:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 10:17 [mtd:spi-nor/next 16/18] drivers/mtd/spi-nor/debugfs.c:84 spi_nor_params_show() warn: '%ph' cannot be followed by 'n' Dan Carpenter
2022-05-11 11:35 ` Michael Walle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome