Skip to content

Commit 76f99fc

Browse files
author
Frederic Weisbecker
committed
soc/qman: test: Use kthread_run_on_cpu()
Use the proper API instead of open coding it. However it looks like kthreads here could be replaced by the use of a per-cpu workqueue instead. Signed-off-by: Frederic Weisbecker <[email protected]>
1 parent 26e6057 commit 76f99fc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/soc/fsl/qbman/qman_test_stash.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,12 @@ static int on_all_cpus(int (*fn)(void))
108108
.fn = fn,
109109
.started = ATOMIC_INIT(0)
110110
};
111-
struct task_struct *k = kthread_create(bstrap_fn, &bstrap,
112-
"hotpotato%d", cpu);
111+
struct task_struct *k = kthread_run_on_cpu(bstrap_fn, &bstrap,
112+
cpu, "hotpotato%d");
113113
int ret;
114114

115115
if (IS_ERR(k))
116116
return -ENOMEM;
117-
kthread_bind(k, cpu);
118-
wake_up_process(k);
119117
/*
120118
* If we call kthread_stop() before the "wake up" has had an
121119
* effect, then the thread may exit with -EINTR without ever

0 commit comments

Comments
 (0)