Message ID | 20211021122758.3092-6-caihuoqing@baidu.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | kthread: Add the helper macro kthread_run_on_cpu() | expand |
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c index ce053619f289..cbd78fd5e491 100644 --- a/kernel/trace/trace_osnoise.c +++ b/kernel/trace/trace_osnoise.c @@ -1525,7 +1525,7 @@ static int start_kthread(unsigned int cpu) #else snprintf(comm, 24, "osnoise/%d", cpu); #endif - kthread = kthread_create_on_cpu(main, NULL, cpu, comm); + kthread = kthread_run_on_cpu(main, NULL, cpu, comm); if (IS_ERR(kthread)) { pr_err(BANNER "could not start sampling thread\n"); @@ -1534,7 +1534,6 @@ static int start_kthread(unsigned int cpu) } per_cpu(per_cpu_osnoise_var, cpu).kthread = kthread; - wake_up_process(kthread); return 0; }
Repalce kthread_create_on_cpu/wake_up_process() with kthread_run_on_cpu() to simplify the code. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> --- v1->v2: Update changelog. kernel/trace/trace_osnoise.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)