Skip to contentSkip to conversation

rcu/tree_exp: cleanup initialized but not used rdp

PATCH In review Jiang Biao 2 participants 3 messages Apr 23, 2019 RCU

lore
Share & tools
lore

Jiang Biao

author
#0 lore raw

PATCH 1/1 rcu/tree_exp: cleanup initialized but not used rdp

rdp is initialized but never used in synchronize_rcu_expedited(), just remove it.

---
 kernel/rcu/tree_exp.h | 2 --
 1 file changed, 2 deletions(-)
kernel/rcu/tree_exp.h +0 -2
index 4c2a0189e748..5772612379e4 100644
@@ -733,7 +733,6 @@ static void sync_sched_exp_online_cleanup(int cpu)
  */
 void synchronize_rcu_expedited(void)
 {
-	struct rcu_data *rdp;
 	struct rcu_exp_work rew;
 	struct rcu_node *rnp;
 	unsigned long s;
@@ -770,7 +769,6 @@ void synchronize_rcu_expedited(void)
 	}
 
 	/* Wait for expedited grace period to complete. */
-	rdp = per_cpu_ptr(&rcu_data, raw_smp_processor_id());
 	rnp = rcu_get_root();
 	wait_event(rnp->exp_wq[rcu_seq_ctr(s) & 0x3],
 		   sync_exp_work_done(s));
Signature · 1 line
2.17.2 (Apple Git-113)
#1 lore raw
Quoted 4 lines · Jiang Biao

rdp is initialized but never used in synchronize_rcu_expedited(), just remove it.

I queued and pushed both patches for testing and review, good eyes, thank you! I reworded the subject and commit logs, so could you please check to make sure that I didn't mess anything up?

Thanx, Paul

Quoted 27 lines
---
 kernel/rcu/tree_exp.h | 2 --
 1 file changed, 2 deletions(-)
kernel/rcu/tree_exp.h +0 -2
index 4c2a0189e748..5772612379e4 100644
@@ -733,7 +733,6 @@ static void sync_sched_exp_online_cleanup(int cpu)
  */
 void synchronize_rcu_expedited(void)
 {
-	struct rcu_data *rdp;
 	struct rcu_exp_work rew;
 	struct rcu_node *rnp;
 	unsigned long s;
@@ -770,7 +769,6 @@ void synchronize_rcu_expedited(void)
 	}
 
 	/* Wait for expedited grace period to complete. */
-	rdp = per_cpu_ptr(&rcu_data, raw_smp_processor_id());
 	rnp = rcu_get_root();
 	wait_event(rnp->exp_wq[rcu_seq_ctr(s) & 0x3],
 		   sync_exp_work_done(s));
Signature · 1 line
2.17.2 (Apple Git-113)
#2 lore raw

Re: [PATCH] rcu/tree_exp: cleanup initialized but not used rdp(Internet mail)

Quoted 8 lines · 在 2019年4月23日,下午4:06,Paul E. McKenney <[email protected]> 写道:
Quoted 3 lines · Jiang Biao

rdp is initialized but never used in synchronize_rcu_expedited(), just remove it.

Quoted 8 lines
Quoted 1 line

I queued and pushed both patches for testing and review, good eyes, thank you! I reworded the subject and commit logs, so could you please check to make sure that I didn't mess anything up?

Thanx, Paul

Already checked, everything’s good to me. Thanks a lot. Jiang,

Quoted 29 lines
Quoted 27 lines

---
kernel/rcu/tree_exp.h | 2 --

1 file changed, 2 deletions(-)
kernel/rcu/tree_exp.h +0 -2
index 4c2a0189e748..5772612379e4 100644
@@ -733,7 +733,6 @@ static void sync_sched_exp_online_cleanup(int cpu)
 */
 void synchronize_rcu_expedited(void)
 {
-	struct rcu_data *rdp;
 	struct rcu_exp_work rew;
 	struct rcu_node *rnp;
 	unsigned long s;
@@ -770,7 +769,6 @@ void synchronize_rcu_expedited(void)
 	}
 
 	/* Wait for expedited grace period to complete. */
-	rdp = per_cpu_ptr(&rcu_data, raw_smp_processor_id());
 	rnp = rcu_get_root();
 	wait_event(rnp->exp_wq[rcu_seq_ctr(s) & 0x3],
 		   sync_exp_work_done(s));
Signature · 1 line
2.17.2 (Apple Git-113)