From: Andrew Morton Date: Wed, 6 Feb 2008 09:37:57 +0000 (-0800) Subject: debug_smp_processor_id() fixlets X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b41ecbebd4091a15233abab2d771e65fb82cdb20;p=openwrt%2Fstaging%2Fblogic.git debug_smp_processor_id() fixlets - Account for debug_smp_processor_id()'s own preempt_disable() when displaying the preempt_count(). - 80 cols, not 800. Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c index eddc9b3d3876..6c90fb90e19c 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c @@ -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();