Skip to content

Commit 28b6561

Browse files
rddunlapgregkh
authored andcommitted
mtd/maps: fix solutionengine.c printk format warnings
[ Upstream commit 1d25e3e ] Fix 2 printk format warnings (this driver is currently only used by arch/sh/) by using "%pap" instead of "%lx". Fixes these build warnings: ../drivers/mtd/maps/solutionengine.c: In function 'init_soleng_maps': ../include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=] ../drivers/mtd/maps/solutionengine.c:62:54: note: format string is defined here printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n", ~~~~^ %08x ../include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=] ../drivers/mtd/maps/solutionengine.c:62:72: note: format string is defined here printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n", ~~~~^ %08x Cc: David Woodhouse <[email protected]> Cc: Brian Norris <[email protected]> Cc: Boris Brezillon <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: [email protected] Cc: Yoshinori Sato <[email protected]> Cc: Rich Felker <[email protected]> Cc: [email protected] Cc: Sergei Shtylyov <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 745cb5e commit 28b6561

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/mtd/maps/solutionengine.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ static int __init init_soleng_maps(void)
5959
return -ENXIO;
6060
}
6161
}
62-
printk(KERN_NOTICE "Solution Engine: Flash at 0x%08lx, EPROM at 0x%08lx\n",
63-
soleng_flash_map.phys & 0x1fffffff,
64-
soleng_eprom_map.phys & 0x1fffffff);
62+
printk(KERN_NOTICE "Solution Engine: Flash at 0x%pap, EPROM at 0x%pap\n",
63+
&soleng_flash_map.phys,
64+
&soleng_eprom_map.phys);
6565
flash_mtd->owner = THIS_MODULE;
6666

6767
eprom_mtd = do_map_probe("map_rom", &soleng_eprom_map);

0 commit comments

Comments
 (0)