Re: [PATCH] Fix printk format vs argument warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Howells <[email protected]> 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 <[email protected]>
>  ---
>  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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux