diff mbox series

[5/6] trace/osnoise: Make use of the helper macro kthread_run_on_cpu()

Message ID 20211021120135.3003-6-caihuoqing@baidu.com (mailing list archive)
State Superseded
Headers show
Series kthread: Add the helper macro kthread_run_on_cpu() | expand

Commit Message

Cai,Huoqing Oct. 21, 2021, 12:01 p.m. UTC
Repalce kthread_create/kthread_bind/wake_up_process()
with kthread_run_on_cpu() to simplify the code.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 kernel/trace/trace_osnoise.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

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;
 }