* [PATCH] x86/early_iounmap: Let the compiler enter the function name
@ 2013-10-03 11:36 Zhang Yanfei
2013-10-06 9:36 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Yanfei @ 2013-10-03 11:36 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Zhang Yanfei, linux-kernel@vger.kernel.org
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
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.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
arch/x86/mm/ioremap.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 799580c..577bd8e 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -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();
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/early_iounmap: Let the compiler enter the function name
2013-10-03 11:36 [PATCH] x86/early_iounmap: Let the compiler enter the function name Zhang Yanfei
@ 2013-10-06 9:36 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2013-10-06 9:36 UTC (permalink / raw)
To: Zhang Yanfei; +Cc: Ingo Molnar, Zhang Yanfei, linux-kernel@vger.kernel.org
* Zhang Yanfei <zhangyanfei.yes@gmail.com> wrote:
> From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
>
> 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.
>
> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> ---
> arch/x86/mm/ioremap.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
> index 799580c..577bd8e 100644
> --- a/arch/x86/mm/ioremap.c
> +++ b/arch/x86/mm/ioremap.c
> @@ -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.
> 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.)
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-06 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 11:36 [PATCH] x86/early_iounmap: Let the compiler enter the function name Zhang Yanfei
2013-10-06 9:36 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox