Skip to contentSkip to conversation

x86/early_iounmap: Let the compiler enter the function name

PATCH In review Zhang Yanfei 2 participants 2 messages Oct 3, 2013 – Oct 6, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/early_iounmap: Let the compiler enter the function name

From: Zhang Yanfei <[email protected]>

To be consistent with early_ioremap which had a change in commit 4f4319a ("x86/ioremap: Correct function name output"), let the complier enter the function name too.

---
 arch/x86/mm/ioremap.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/mm/ioremap.c +4 -4
index 799580c..577bd8e 100644
@@ -585,21 +585,21 @@ void __init early_iounmap(void __iomem *addr, unsigned long size)
 	}
 
 	if (slot < 0) {
-		printk(KERN_INFO "early_iounmap(%p, %08lx) not found slot\n",
+		printk(KERN_INFO "%s(%p, %08lx) not found slot\n", __func__,
 			 addr, size);
 		WARN_ON(1);
 		return;
 	}
 
 	if (prev_size[slot] != size) {
-		printk(KERN_INFO "early_iounmap(%p, %08lx) [%d] size not consistent %08lx\n",
-			 addr, size, slot, prev_size[slot]);
+		printk(KERN_INFO "%s(%p, %08lx) [%d] size not consistent %08lx\n",
+			 __func__, addr, size, slot, prev_size[slot]);
 		WARN_ON(1);
 		return;
 	}
 
 	if (early_ioremap_debug) {
-		printk(KERN_INFO "early_iounmap(%p, %08lx) [%d]\n", addr,
+		printk(KERN_INFO "%s(%p, %08lx) [%d]\n", __func__, addr,
 		       size, slot);
 		dump_stack();
 	}
Signature · 1 line
1.7.1
#1 lore raw
Quoted 16 lines · Zhang Yanfei

From: Zhang Yanfei <[email protected]>

To be consistent with early_ioremap which had a change in commit 4f4319a ("x86/ioremap: Correct function name output"), let the complier enter the function name too.

---
 arch/x86/mm/ioremap.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/mm/ioremap.c +0 -0
index 799580c..577bd8e 100644

arch/x86/mm/ioremap.c void __init early_iounmap(void __iomem *addr, unsigned long size) · line 588

Quoted 5 lines
arch/x86/mm/ioremap.c +1 -1
@@ -585,21 +585,21 @@ void __init early_iounmap(void __iomem *addr, unsigned long size)
 	}
 
 	if (slot < 0) {
-		printk(KERN_INFO "early_iounmap(%p, %08lx) not found slot\n",
+		printk(KERN_INFO "%s(%p, %08lx) not found slot\n", __func__,

Would be nice to fix the spelling here as well then.

arch/x86/mm/ioremap.c void __init early_iounmap(void __iomem *addr, unsigned long size) · line 596

Quoted 10 lines
arch/x86/mm/ioremap.c +2 -2
 			 addr, size);
 		WARN_ON(1);
 		return;
 	}
 
 	if (prev_size[slot] != size) {
-		printk(KERN_INFO "early_iounmap(%p, %08lx) [%d] size not consistent %08lx\n",
-			 addr, size, slot, prev_size[slot]);
+		printk(KERN_INFO "%s(%p, %08lx) [%d] size not consistent %08lx\n",
+			 __func__, addr, size, slot, prev_size[slot]);

and here too, i.e. write:

slot [%d] size [%08lx] not consistent with previous size [%08lx]

(Note that size can be duplicated there for completeness - even though it's included in the early_iounmap() printout already.)

arch/x86/mm/ioremap.c void __init early_iounmap(void __iomem *addr, unsigned long size) · line 604

Quoted 5 lines
arch/x86/mm/ioremap.c +1 -1
 	if (early_ioremap_debug) {
-		printk(KERN_INFO "early_iounmap(%p, %08lx) [%d]\n", addr,
+		printk(KERN_INFO "%s(%p, %08lx) [%d]\n", __func__, addr,
 		       size, slot);
 		dump_stack();

I'd also stick that into a debug_print() helper define that prints the standard bits, leaving only the important bits at actual call sites:

		debug_print("size [%08lx] not consistent with previous size [%08lx]\n
		debug_print("call\n", addr, size, slot);

Thanks,

Ingo