[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220125071808.459017-1-yinxiujiang@kylinos.cn>
Date: Tue, 25 Jan 2022 15:18:08 +0800
From: Yin Xiujiang <yinxiujiang@...inos.cn>
To: mareklindner@...mailbox.ch, sw@...onwunderlich.de, a@...table.cc,
sven@...fation.org, davem@...emloft.net, kuba@...nel.org
Cc: b.a.t.m.a.n@...ts.open-mesh.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] batman-adv: Make use of the helper macro kthread_run()
Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.
Signed-off-by: Yin Xiujiang <yinxiujiang@...inos.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
Powered by blists - more mailing lists