Re: [rogerq:ti-5.10/am64-nand-1.0 3/11] drivers/memory/omap-gpmc.c:1457:29: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'resource_size_t' {aka 'unsigned int'}
From: Geert Uytterhoeven
Date: Tue Oct 12 2021 - 02:45:26 EST
On Mon, Oct 11, 2021 at 10:38 PM kernel test robot <lkp@xxxxxxxxx> wrote:
> tree: https://github.com/rogerq/linux ti-5.10/am64-nand-1.0
> head: 10d87efaf33242b8e38807319ce22ee16c1ca438
> commit: 956722fabd30d83fc4671bb70a7554c2b40701b8 [3/11] memory: omap-gpmc: Add support for GPMC on AM64 SoC
> config: m68k-allmodconfig (attached as .config)
> compiler: m68k-linux-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/rogerq/linux/commit/956722fabd30d83fc4671bb70a7554c2b40701b8
> git remote add rogerq https://github.com/rogerq/linux
> git fetch --no-tags rogerq ti-5.10/am64-nand-1.0
> git checkout 956722fabd30d83fc4671bb70a7554c2b40701b8
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
> All warnings (new ones prefixed by >>):
>
> In file included from include/linux/device.h:15,
> from include/linux/gpio/driver.h:5,
> from drivers/memory/omap-gpmc.c:20:
> drivers/memory/omap-gpmc.c: In function 'gpmc_mem_init':
> >> drivers/memory/omap-gpmc.c:1457:29: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
> 1457 | dev_info(gpmc->dev, "start: 0x%llx, end: 0x%llx\n", gpmc_mem_root.start, gpmc_mem_root.end);
Use %pR to print resources, cfr. Documentation/core-api/printk-formats.rst
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
> 19 | #define dev_fmt(fmt) fmt
> | ^~~
> drivers/memory/omap-gpmc.c:1457:9: note: in expansion of macro 'dev_info'
> 1457 | dev_info(gpmc->dev, "start: 0x%llx, end: 0x%llx\n", gpmc_mem_root.start, gpmc_mem_root.end);
> | ^~~~~~~~
> drivers/memory/omap-gpmc.c:1457:42: note: format string is defined here
> 1457 | dev_info(gpmc->dev, "start: 0x%llx, end: 0x%llx\n", gpmc_mem_root.start, gpmc_mem_root.end);
> | ~~~^
> | |
> | long long unsigned int
> | %x
> In file included from include/linux/device.h:15,
> from include/linux/gpio/driver.h:5,
> from drivers/memory/omap-gpmc.c:20:
> drivers/memory/omap-gpmc.c:1457:29: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
> 1457 | dev_info(gpmc->dev, "start: 0x%llx, end: 0x%llx\n", gpmc_mem_root.start, gpmc_mem_root.end);
Likewise.
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
> 19 | #define dev_fmt(fmt) fmt
> | ^~~
> drivers/memory/omap-gpmc.c:1457:9: note: in expansion of macro 'dev_info'
> 1457 | dev_info(gpmc->dev, "start: 0x%llx, end: 0x%llx\n", gpmc_mem_root.start, gpmc_mem_root.end);
> | ^~~~~~~~
> drivers/memory/omap-gpmc.c:1457:55: note: format string is defined here
> 1457 | dev_info(gpmc->dev, "start: 0x%llx, end: 0x%llx\n", gpmc_mem_root.start, gpmc_mem_root.end);
> | ~~~^
> | |
> | long long unsigned int
> | %x
> In file included from include/linux/device.h:15,
> from include/linux/gpio/driver.h:5,
> from drivers/memory/omap-gpmc.c:20:
> drivers/memory/omap-gpmc.c: In function 'gpmc_probe_generic_child':
> >> drivers/memory/omap-gpmc.c:2178:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'phys_addr_t' {aka 'unsigned int'} [-Wformat=]
Use %pa to format phys_addr_t.
> 2178 | "GPMC CS %d start cannot be lesser than 0x%llx\n",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
> 19 | #define dev_fmt(fmt) fmt
> | ^~~
> drivers/memory/omap-gpmc.c:2177:25: note: in expansion of macro 'dev_info'
> 2177 | dev_info(&pdev->dev,
> | ^~~~~~~~
> drivers/memory/omap-gpmc.c:2178:79: note: format string is defined here
> 2178 | "GPMC CS %d start cannot be lesser than 0x%llx\n",
> | ~~~^
> | |
> | long long unsigned int
> | %x
> In file included from include/linux/device.h:15,
> from include/linux/gpio/driver.h:5,
> from drivers/memory/omap-gpmc.c:20:
> drivers/memory/omap-gpmc.c:2182:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'phys_addr_t' {aka 'unsigned int'} [-Wformat=]
> 2182 | "GPMC CS %d end cannot be greater than 0x%llx\n",
Likewise.
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
> 19 | #define dev_fmt(fmt) fmt
> | ^~~
> drivers/memory/omap-gpmc.c:2181:25: note: in expansion of macro 'dev_info'
> 2181 | dev_info(&pdev->dev,
> | ^~~~~~~~
> drivers/memory/omap-gpmc.c:2182:78: note: format string is defined here
> 2182 | "GPMC CS %d end cannot be greater than 0x%llx\n",
> | ~~~^
> | |
> | long long unsigned int
> | %x
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds