diff mbox series

[v2,1/3] scftorture: Avoid additional div operation.

Message ID 20241107111821.3417762-2-bigeasy@linutronix.de (mailing list archive)
State New
Headers show
Series scftorture: Avoid kfree from IRQ context. | expand

Commit Message

Sebastian Andrzej Siewior Nov. 7, 2024, 11:13 a.m. UTC
Replace "scfp->cpu % nr_cpu_ids" with "cpu". This has been computed
earlier.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 kernel/scftorture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel/scftorture.c b/kernel/scftorture.c
index 44e83a6462647..455cbff35a1a2 100644
--- a/kernel/scftorture.c
+++ b/kernel/scftorture.c
@@ -463,7 +463,7 @@  static int scftorture_invoker(void *arg)
 
 	// Make sure that the CPU is affinitized appropriately during testing.
 	curcpu = raw_smp_processor_id();
-	WARN_ONCE(curcpu != scfp->cpu % nr_cpu_ids,
+	WARN_ONCE(curcpu != cpu,
 		  "%s: Wanted CPU %d, running on %d, nr_cpu_ids = %d\n",
 		  __func__, scfp->cpu, curcpu, nr_cpu_ids);