summaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_plugin.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2012-06-28 11:08:25 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-07-06 09:01:48 -0400
commitc701d5d9b384ff03ceb232ef21236364d784a411 (patch)
treeae5b4793c478d3c575e506f1d36c798b73c542ff /kernel/rcutree_plugin.h
parent02a0677b0be545a07ffb15a13419efd7c82881e0 (diff)
rcu: Fix code-style issues involving "else"
The Linux kernel coding style says that single-statement blocks should omit curly braces unless the other leg of the "if" statement has multiple statements, in which case the curly braces should be included. This commit fixes RCU's violations of this rule. Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r--kernel/rcutree_plugin.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index a9194d5606c4..7f3244c0df01 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -390,8 +390,9 @@ void rcu_read_unlock_special(struct task_struct *t)
390 rnp->grphi, 390 rnp->grphi,
391 !!rnp->gp_tasks); 391 !!rnp->gp_tasks);
392 rcu_report_unblock_qs_rnp(rnp, flags); 392 rcu_report_unblock_qs_rnp(rnp, flags);
393 } else 393 } else {
394 raw_spin_unlock_irqrestore(&rnp->lock, flags); 394 raw_spin_unlock_irqrestore(&rnp->lock, flags);
395 }
395 396
396#ifdef CONFIG_RCU_BOOST 397#ifdef CONFIG_RCU_BOOST
397 /* Unboost if we were boosted. */ 398 /* Unboost if we were boosted. */
@@ -757,9 +758,9 @@ sync_rcu_preempt_exp_init(struct rcu_state *rsp, struct rcu_node *rnp)
757 int must_wait = 0; 758 int must_wait = 0;
758 759
759 raw_spin_lock_irqsave(&rnp->lock, flags); 760 raw_spin_lock_irqsave(&rnp->lock, flags);
760 if (list_empty(&rnp->blkd_tasks)) 761 if (list_empty(&rnp->blkd_tasks)) {
761 raw_spin_unlock_irqrestore(&rnp->lock, flags); 762 raw_spin_unlock_irqrestore(&rnp->lock, flags);
762 else { 763 } else {
763 rnp->exp_tasks = rnp->blkd_tasks.next; 764 rnp->exp_tasks = rnp->blkd_tasks.next;
764 rcu_initiate_boost(rnp, flags); /* releases rnp->lock */ 765 rcu_initiate_boost(rnp, flags); /* releases rnp->lock */
765 must_wait = 1; 766 must_wait = 1;
@@ -803,9 +804,9 @@ void synchronize_rcu_expedited(void)
803 * expedited grace period for us, just leave. 804 * expedited grace period for us, just leave.
804 */ 805 */
805 while (!mutex_trylock(&sync_rcu_preempt_exp_mutex)) { 806 while (!mutex_trylock(&sync_rcu_preempt_exp_mutex)) {
806 if (trycount++ < 10) 807 if (trycount++ < 10) {
807 udelay(trycount * num_online_cpus()); 808 udelay(trycount * num_online_cpus());
808 else { 809 } else {
809 synchronize_rcu(); 810 synchronize_rcu();
810 return; 811 return;
811 } 812 }
@@ -2093,8 +2094,9 @@ static void rcu_prepare_for_idle(int cpu)
2093 if (rcu_cpu_has_callbacks(cpu)) { 2094 if (rcu_cpu_has_callbacks(cpu)) {
2094 trace_rcu_prep_idle("More callbacks"); 2095 trace_rcu_prep_idle("More callbacks");
2095 invoke_rcu_core(); 2096 invoke_rcu_core();
2096 } else 2097 } else {
2097 trace_rcu_prep_idle("Callbacks drained"); 2098 trace_rcu_prep_idle("Callbacks drained");
2099 }
2098} 2100}
2099 2101
2100/* 2102/*