netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] batman-adv: Make use of the helper macro kthread_run()
@ 2022-01-25  7:18 Yin Xiujiang
  0 siblings, 0 replies; only message in thread
From: Yin Xiujiang @ 2022-01-25  7:18 UTC (permalink / raw)
  To: mareklindner, sw, a, sven, davem, kuba; +Cc: b.a.t.m.a.n, netdev, linux-kernel

Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.

Signed-off-by: Yin Xiujiang <yinxiujiang@kylinos.cn>
---
 net/batman-adv/tp_meter.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
index 93730d30af54..a36e498c7c8f 100644
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -905,7 +905,7 @@ static void batadv_tp_start_kthread(struct batadv_tp_vars *tp_vars)
 	u32 session_cookie;
 
 	kref_get(&tp_vars->refcount);
-	kthread = kthread_create(batadv_tp_send, tp_vars, "kbatadv_tp_meter");
+	kthread = kthread_run(batadv_tp_send, tp_vars, "kbatadv_tp_meter");
 	if (IS_ERR(kthread)) {
 		session_cookie = batadv_tp_session_cookie(tp_vars->session,
 							  tp_vars->icmp_uid);
@@ -921,8 +921,6 @@ static void batadv_tp_start_kthread(struct batadv_tp_vars *tp_vars)
 		batadv_tp_sender_cleanup(bat_priv, tp_vars);
 		return;
 	}
-
-	wake_up_process(kthread);
 }
 
 /**
-- 
2.30.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-25  7:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25  7:18 [PATCH] batman-adv: Make use of the helper macro kthread_run() Yin Xiujiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).