* [PATCH] Fix printk format vs argument warning
@ 2005-07-05 20:03 David Howells
2005-07-05 21:33 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2005-07-05 20:03 UTC (permalink / raw)
To: torvalds, akpm; +Cc: linux-kernel
The attached patch makes the argument to this printk in
calibrate_migration_costs() always long to match the format string.
Signed-Off-By: David Howells <dhowells@redhat.com>
---
warthog>diffstat -p1 format-arg-size-2612mm1-10.diff
kernel/sched.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -uNrp linux-2.6.12-mm1/kernel/sched.c linux-2.6.12-mm1-cachefs-wander/kernel/sched.c
--- linux-2.6.12-mm1/kernel/sched.c 2005-06-22 13:54:08.000000000 +0100
+++ linux-2.6.12-mm1-cachefs-wander/kernel/sched.c 2005-06-22 14:10:57.000000000 +0100
@@ -5572,7 +5572,7 @@ void __devinit calibrate_migration_costs
printk("| migration cost matrix (max_cache_size: %d, cpu: %ld MHz):\n",
max_cache_size,
#ifdef CONFIG_X86
- cpu_khz/1000
+ cpu_khz/1000L
#else
-1L
#endif
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix printk format vs argument warning
2005-07-05 20:03 [PATCH] Fix printk format vs argument warning David Howells
@ 2005-07-05 21:33 ` Andrew Morton
2005-07-05 21:40 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2005-07-05 21:33 UTC (permalink / raw)
To: David Howells; +Cc: torvalds, linux-kernel, Ingo Molnar
David Howells <dhowells@redhat.com> wrote:
>
> The attached patch makes the argument to this printk in
> calibrate_migration_costs() always long to match the format string.
That darn printk again. You wouldn't believe...
calibrate_migration_costs() causes a storm of boot-time output and I think
all those printks should be removed before this code goes up to Linus.
Maybe split out into a separate -mm-only patch?
> Signed-Off-By: David Howells <dhowells@redhat.com>
> ---
> warthog>diffstat -p1 format-arg-size-2612mm1-10.diff
> kernel/sched.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> diff -uNrp linux-2.6.12-mm1/kernel/sched.c linux-2.6.12-mm1-cachefs-wander/kernel/sched.c
> --- linux-2.6.12-mm1/kernel/sched.c 2005-06-22 13:54:08.000000000 +0100
> +++ linux-2.6.12-mm1-cachefs-wander/kernel/sched.c 2005-06-22 14:10:57.000000000 +0100
> @@ -5572,7 +5572,7 @@ void __devinit calibrate_migration_costs
> printk("| migration cost matrix (max_cache_size: %d, cpu: %ld MHz):\n",
> max_cache_size,
> #ifdef CONFIG_X86
> - cpu_khz/1000
> + cpu_khz/1000L
> #else
It's currently %d in my tree. This is why I converted x86's cpu_khz from
unsigned long to unsigned, to match x86_64's.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix printk format vs argument warning
2005-07-05 21:33 ` Andrew Morton
@ 2005-07-05 21:40 ` Ingo Molnar
0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2005-07-05 21:40 UTC (permalink / raw)
To: Andrew Morton; +Cc: David Howells, torvalds, linux-kernel
* Andrew Morton <akpm@osdl.org> wrote:
> calibrate_migration_costs() causes a storm of boot-time output and I
> think all those printks should be removed before this code goes up to
> Linus. Maybe split out into a separate -mm-only patch?
it was only a debugging measure. Patch below turns off.
------
turn off migration debugging.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: linux-sched-curr/kernel/sched.c
===================================================================
--- linux-sched-curr.orig/kernel/sched.c
+++ linux-sched-curr/kernel/sched.c
@@ -5043,7 +5043,7 @@ __init static unsigned long domain_dista
return distance;
}
-static __initdata unsigned int migration_debug = 1;
+static __initdata unsigned int migration_debug = 0;
static int __init setup_migration_debug(char *str)
{
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-05 21:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-05 20:03 [PATCH] Fix printk format vs argument warning David Howells
2005-07-05 21:33 ` Andrew Morton
2005-07-05 21:40 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox