Skip to contentSkip to conversation

powerpc/wii: Remove redundant 0x prefixes

PATCH In review Thorsten Blum 2 participants 3 messages Nov 3 – Nov 4 PowerPC

lore
Share & tools
lore
#0 lore raw

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.

Fixes 7b69600d4da0 ("powerpc/wii: fix resource printk format warnings")
---
 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
index 91a8f0a7086e..e9c84793cc4d 100644
@@ -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
index 1522a8bece29..a1bdb83fe51f 100644
@@ -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
index e7eec328f121..928d082abf56 100644
@@ -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);
Acked-by on v1 1/1
#1 lore raw
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")

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
index 91a8f0a7086e..e9c84793cc4d 100644
@@ -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
index 1522a8bece29..a1bdb83fe51f 100644
@@ -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
index e7eec328f121..928d082abf56 100644
@@ -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
#2 lore raw
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")

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