Skip to content

Commit 9a87bda

Browse files
paulmckrcuFrederic Weisbecker
authored andcommitted
srcu: Standardize srcu_data pointers to "sdp" and similar
This commit changes a few "cpuc" variables to "sdp" to align with usage elsewhere. [ paulmck: Apply Neeraj Upadhyay feedback. ] Signed-off-by: Paul E. McKenney <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Kent Overstreet <[email protected]> Cc: <[email protected]> Reviewed-by: Neeraj Upadhyay <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]>
1 parent c2f9467 commit 9a87bda

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

kernel/rcu/srcutree.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,9 @@ static unsigned long srcu_readers_lock_idx(struct srcu_struct *ssp, int idx)
438438
unsigned long sum = 0;
439439

440440
for_each_possible_cpu(cpu) {
441-
struct srcu_data *cpuc = per_cpu_ptr(ssp->sda, cpu);
441+
struct srcu_data *sdp = per_cpu_ptr(ssp->sda, cpu);
442442

443-
sum += atomic_long_read(&cpuc->srcu_lock_count[idx]);
443+
sum += atomic_long_read(&sdp->srcu_lock_count[idx]);
444444
}
445445
return sum;
446446
}
@@ -456,11 +456,11 @@ static unsigned long srcu_readers_unlock_idx(struct srcu_struct *ssp, int idx)
456456
unsigned long sum = 0;
457457

458458
for_each_possible_cpu(cpu) {
459-
struct srcu_data *cpuc = per_cpu_ptr(ssp->sda, cpu);
459+
struct srcu_data *sdp = per_cpu_ptr(ssp->sda, cpu);
460460

461-
sum += atomic_long_read(&cpuc->srcu_unlock_count[idx]);
461+
sum += atomic_long_read(&sdp->srcu_unlock_count[idx]);
462462
if (IS_ENABLED(CONFIG_PROVE_RCU))
463-
mask = mask | READ_ONCE(cpuc->srcu_reader_flavor);
463+
mask = mask | READ_ONCE(sdp->srcu_reader_flavor);
464464
}
465465
WARN_ONCE(IS_ENABLED(CONFIG_PROVE_RCU) && (mask & (mask - 1)),
466466
"Mixed NMI-safe readers for srcu_struct at %ps.\n", ssp);
@@ -564,12 +564,12 @@ static bool srcu_readers_active(struct srcu_struct *ssp)
564564
unsigned long sum = 0;
565565

566566
for_each_possible_cpu(cpu) {
567-
struct srcu_data *cpuc = per_cpu_ptr(ssp->sda, cpu);
567+
struct srcu_data *sdp = per_cpu_ptr(ssp->sda, cpu);
568568

569-
sum += atomic_long_read(&cpuc->srcu_lock_count[0]);
570-
sum += atomic_long_read(&cpuc->srcu_lock_count[1]);
571-
sum -= atomic_long_read(&cpuc->srcu_unlock_count[0]);
572-
sum -= atomic_long_read(&cpuc->srcu_unlock_count[1]);
569+
sum += atomic_long_read(&sdp->srcu_lock_count[0]);
570+
sum += atomic_long_read(&sdp->srcu_lock_count[1]);
571+
sum -= atomic_long_read(&sdp->srcu_unlock_count[0]);
572+
sum -= atomic_long_read(&sdp->srcu_unlock_count[1]);
573573
}
574574
return sum;
575575
}

0 commit comments

Comments
 (0)