powerpc/wii: Remove redundant 0x prefixes
PATCH 1/1 powerpc/wii: Remove redundant 0x prefixes
The %pa format specifier already includes the 0x prefix. Remove the redundant prefixes to avoid printing 0x0x.
--- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/wii.c | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-)
arch/powerpc/platforms/embedded6xx/flipper-pic.c +1 -1
@@ -145,7 +145,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%pa mapped to 0x%p\n" , &res.start, io_base); +pr_info ("controller at %pa mapped to 0x%p\n" , &res.start, io_base);__flipper_quiesce (io_base);
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +1 -1
@@ -171,7 +171,7 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)return NULL ; } -pr_info ("controller at 0x%pa mapped to 0x%p\n" , &res.start, io_base); +pr_info ("controller at %pa mapped to 0x%p\n" , &res.start, io_base);__hlwd_quiesce (io_base);
arch/powerpc/platforms/embedded6xx/wii.c +2 -4
@@ -73,10 +73,8 @@ static void __iomem *__init wii_ioremap_hw_regs(char *name, char *compatible) } hw_regs =ioremap (res.start,resource_size (&res)); -if (hw_regs) { -pr_info ("%s at 0x%pa mapped to 0x%p\n" , name, - &res.start, hw_regs); - } +if (hw_regs) +pr_info ("%s at %pa mapped to 0x%p\n" , name, &res.start, hw_regs); out_put:of_node_put (np);
Quoted 5 lines · Thorsten Blum
The %pa format specifier already includes the 0x prefix. Remove the redundant prefixes to avoid printing 0x0x.
Fixes 7b69600d4da0 ("powerpc/wii: fix resource printk format warnings")Signed-off-by Thorsten Blum <[email protected]>
There are other cases of this elsewhere in the kernel sources. Are you addressing those also?
Thanks.
Quoted 49 lines
--- arch/powerpc/platforms/embedded6xx/flipper-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +- arch/powerpc/platforms/embedded6xx/wii.c | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-)arch/powerpc/platforms/embedded6xx/flipper-pic.c +1
-1@@ -145,7 +145,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%pa mapped to 0x%p\n" , &res.start, io_base); +pr_info ("controller at %pa mapped to 0x%p\n" , &res.start, io_base);__flipper_quiesce (io_base);arch/powerpc/platforms/embedded6xx/hlwd-pic.c +1
-1@@ -171,7 +171,7 @@ static struct irq_domain *__init hlwd_pic_init(struct device_node *np)return NULL ; } -pr_info ("controller at 0x%pa mapped to 0x%p\n" , &res.start, io_base); +pr_info ("controller at %pa mapped to 0x%p\n" , &res.start, io_base);__hlwd_quiesce (io_base);arch/powerpc/platforms/embedded6xx/wii.c +2
-4@@ -73,10 +73,8 @@ static void __iomem *__init wii_ioremap_hw_regs(char *name, char *compatible) } hw_regs =ioremap (res.start,resource_size (&res)); -if (hw_regs) { -pr_info ("%s at 0x%pa mapped to 0x%p\n" , name, - &res.start, hw_regs); - } +if (hw_regs) +pr_info ("%s at %pa mapped to 0x%p\n" , name, &res.start, hw_regs); out_put:of_node_put (np);
Signature · 1 line
~Randy
Quoted 11 lines · Randy Dunlap
Quoted 5 lines · Thorsten Blum
The %pa format specifier already includes the 0x prefix. Remove the redundant prefixes to avoid printing 0x0x.
Fixes 7b69600d4da0 ("powerpc/wii: fix resource printk format warnings")Signed-off-by Thorsten Blum <[email protected]>Acked-by Randy Dunlap <[email protected]>There are other cases of this elsewhere in the kernel sources. Are you addressing those also?
Some yes:
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/lkml/[email protected]/
I probably won't be touching any of the remaining ones in drivers/ anytime soon.
Thanks,
Thorsten