]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/wii: fix resource printk format warnings
authorRandy Dunlap <rdunlap@infradead.org>
Thu, 23 Feb 2023 07:01:14 +0000 (23:01 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:50 +0000 (11:35 +0200)
[ Upstream commit 7b69600d4da0049244e9be2f5ef5a2f8e04fcd9a ]

Use "%pa" format specifier for resource_size_t to avoid compiler
printk format warnings.

../arch/powerpc/platforms/embedded6xx/flipper-pic.c: In function 'flipper_pic_init':
../include/linux/kern_levels.h:5:25: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
../arch/powerpc/platforms/embedded6xx/flipper-pic.c:148:9: note: in expansion of macro 'pr_info'
  148 |         pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base);
      |         ^~~~~~~

../arch/powerpc/platforms/embedded6xx/hlwd-pic.c: In function 'hlwd_pic_init':
../include/linux/kern_levels.h:5:25: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
../arch/powerpc/platforms/embedded6xx/hlwd-pic.c:174:9: note: in expansion of macro 'pr_info'
  174 |         pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base);
      |         ^~~~~~~

../arch/powerpc/platforms/embedded6xx/wii.c: In function 'wii_ioremap_hw_regs':
../include/linux/kern_levels.h:5:25: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
../arch/powerpc/platforms/embedded6xx/wii.c:77:17: note: in expansion of macro 'pr_info'
   77 |                 pr_info("%s at 0x%08x mapped to 0x%p\n", name,
      |                 ^~~~~~~

Fixes: caef4e98cf44 ("powerpc: gamecube/wii: flipper interrupt controller support")
Fixes: 98f3403c4c37 ("powerpc: wii: hollywood interrupt controller support")
Fixes: 1ed2416382ed ("powerpc: wii: platform support")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230223070116.660-3-rdunlap@infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/embedded6xx/flipper-pic.c
arch/powerpc/platforms/embedded6xx/hlwd-pic.c
arch/powerpc/platforms/embedded6xx/wii.c

index d39a9213a3e69f8cbb9326c73faff17512ecb581..7dd2e2f97aae5287a7a264fe4c9c72f20c547d49 100644 (file)
@@ -144,7 +144,7 @@ static struct irq_domain * __init flipper_pic_init(struct device_node *np)
        }
        io_base = ioremap(res.start, resource_size(&res));
 
-       pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base);
+       pr_info("controller at 0x%pa mapped to 0x%p\n", &res.start, io_base);
 
        __flipper_quiesce(io_base);
 
index de10c13de15c6655e4ca39e433874c789d5704fa..c6b492ebb7662f7f53a49921ea61affbf291627a 100644 (file)
@@ -173,7 +173,7 @@ static struct irq_domain *hlwd_pic_init(struct device_node *np)
                return NULL;
        }
 
-       pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base);
+       pr_info("controller at 0x%pa mapped to 0x%p\n", &res.start, io_base);
 
        __hlwd_quiesce(io_base);
 
index 67e48b0a164e381d7f9df1c0b1965b3b8ba98d4a..c691453dfd3febaf55aca1f7c10d3f663195a0b1 100644 (file)
@@ -89,8 +89,8 @@ static void __iomem *wii_ioremap_hw_regs(char *name, char *compatible)
 
        hw_regs = ioremap(res.start, resource_size(&res));
        if (hw_regs) {
-               pr_info("%s at 0x%08x mapped to 0x%p\n", name,
-                       res.start, hw_regs);
+               pr_info("%s at 0x%pa mapped to 0x%p\n", name,
+                       &res.start, hw_regs);
        }
 
 out_put: