| Date | Wed, 1 Feb 2012 22:07:52 -0800 | From | Josh Triplett <> | Subject | Re: [PATCH RFC tip/core/rcu 37/41] lockdep: Add CPU-idle/offline warning to lockdep-RCU splat |
| |
On Wed, Feb 01, 2012 at 11:41:55AM -0800, Paul E. McKenney wrote: > --- a/kernel/lockdep.c > +++ b/kernel/lockdep.c > @@ -4176,7 +4176,13 @@ void lockdep_rcu_suspicious(const char *file, const int line, const char *s) > printk("-------------------------------\n"); > printk("%s:%d %s!\n", file, line, s); > printk("\nother info that might help us debug this:\n\n"); > - printk("\nrcu_scheduler_active = %d, debug_locks = %d\n", rcu_scheduler_active, debug_locks); > + printk("\n%srcu_scheduler_active = %d, debug_locks = %d\n", > + !rcu_lockdep_current_cpu_online() > + ? "RCU used illegally from offline CPU!\n" > + : rcu_is_cpu_idle() > + ? "RCU used illegally from idle CPU!\n" > + : "",
Not the usual way I've seen chained ?: indented in kernel code:
cond1 ? value1 : cond2 ? value2 : value3
That avoids repeated indentation over to the right, much like "else if".
- Josh Triplett
|