Skip to content

Commit 29d3939

Browse files
committed
torture: Save a line in stutter_wait(): while -> for
Signed-off-by: Paul E. McKenney <[email protected]>
1 parent a2f2577 commit 29d3939

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/torture.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ void stutter_wait(const char *title)
576576

577577
cond_resched_rcu_qs();
578578
spt = READ_ONCE(stutter_pause_test);
579-
while (spt) {
579+
for (; spt; spt = READ_ONCE(stutter_pause_test)) {
580580
if (spt == 1) {
581581
schedule_timeout_interruptible(1);
582582
} else if (spt == 2) {
@@ -586,7 +586,6 @@ void stutter_wait(const char *title)
586586
schedule_timeout_interruptible(round_jiffies_relative(HZ));
587587
}
588588
torture_shutdown_absorb(title);
589-
spt = READ_ONCE(stutter_pause_test);
590589
}
591590
}
592591
EXPORT_SYMBOL_GPL(stutter_wait);

0 commit comments

Comments
 (0)