Skip to content

Commit 42eeb3b

Browse files
Sebastian Andrzej Siewiorpaulmckrcu
authored andcommitted
scftorture: Avoid additional div operation.
Replace "scfp->cpu % nr_cpu_ids" with "cpu". This has been computed earlier. Tested-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Tested-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 9852d85 commit 42eeb3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/scftorture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ static int scftorture_invoker(void *arg)
463463

464464
// Make sure that the CPU is affinitized appropriately during testing.
465465
curcpu = raw_smp_processor_id();
466-
WARN_ONCE(curcpu != scfp->cpu % nr_cpu_ids,
466+
WARN_ONCE(curcpu != cpu,
467467
"%s: Wanted CPU %d, running on %d, nr_cpu_ids = %d\n",
468468
__func__, scfp->cpu, curcpu, nr_cpu_ids);
469469

0 commit comments

Comments
 (0)