debug_smp_processor_id() fixlets
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 6 Feb 2008 09:37:57 +0000 (01:37 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 6 Feb 2008 18:41:09 +0000 (10:41 -0800)
- Account for debug_smp_processor_id()'s own preempt_disable() when
  displaying the preempt_count().

- 80 cols, not 800.

Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/smp_processor_id.c

index eddc9b3d38762ed17b06da35f26450f34c9ffd1a..6c90fb90e19c2ec25571947b7b98f88262e23ba4 100644 (file)
@@ -42,7 +42,9 @@ unsigned int debug_smp_processor_id(void)
        if (!printk_ratelimit())
                goto out_enable;
 
-       printk(KERN_ERR "BUG: using smp_processor_id() in preemptible [%08x] code: %s/%d\n", preempt_count(), current->comm, current->pid);
+       printk(KERN_ERR "BUG: using smp_processor_id() in preemptible [%08x] "
+                       "code: %s/%d\n",
+                       preempt_count() - 1, current->comm, current->pid);
        print_symbol("caller is %s\n", (long)__builtin_return_address(0));
        dump_stack();