Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4010343pxb; Tue, 25 Jan 2022 01:17:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJydXMGDXAko63waU4Nsk0QBvsbZnROOlDKTul6Ebtx8oFOmRQI6rod6Vjtn5+ZNfptB+g4h X-Received: by 2002:a17:906:3819:: with SMTP id v25mr15154162ejc.539.1643102255080; Tue, 25 Jan 2022 01:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643102255; cv=none; d=google.com; s=arc-20160816; b=0slsIy3XCozcnsJQVsd+cya7zUNBC97ZyL8hzz6caIIQYrsISs8ZGX2Jq6n4gRhJ18 L6DSDWsgW6N+LkZUtcxi0wvNAFDINsI+hjCittOdiXF4AWZlPf7DIdgRgp8Uv4SqY0J8 xZaxWHZtVhaRQ+9iCP+IY0IRv5qronl7SzPbf7qYEkaiNqbMpWS+305Lo0c1bZtadW8+ luvaFEcxlooAd0Ad5b1FrekkJk269qVrZCv6Npw/9XOwBI7QQED2/lRCS7YeojGtPE+e 7PQ/PWytNwdj9wd0vD7W1IFa3yK9h+5nWdHUgPbw78L8VFEG5JXIOU1bH1XMDmNIjHsR YvrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=DlcdNVOKI0t799vKQQidQiMKL7EfRiUJXI2zwBi2m0s=; b=g6vzjLOf6AbZ/GsqJ7lS1l63lq0eJq16iUr2XRxrYS9InGU0byOVYdIoM+mVKw8wUI 9fiIo7pTXQQOnk0R5K28vmJ5/bvz64EPzwcTbhfA64bggDeAm9oRQAk1JXqBerN1RP/1 GX64azWg+aKCQ+1GaQP8UH5RmzHb4NHIcAd9qZeWmtpxOAq8gZWQRGe9v9hLw3v24F/B D4V1Q8DDbnBoRLZpMsSVrQDyNUQui5V1vr3wTA3nUo6K8wQMMr4HkEygglZRjOsXUpJP PlWDKwlU/iIrgM3Uj9AXbyML97t3T3vJz1p1ol30mkEsx/F9dgboSXASTQKXnSQUS2oD zc7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o22si1743269edc.219.2022.01.25.01.17.08; Tue, 25 Jan 2022 01:17:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443922AbiAYHWJ (ORCPT + 99 others); Tue, 25 Jan 2022 02:22:09 -0500 Received: from mailgw.kylinos.cn ([123.150.8.42]:35480 "EHLO nksmu.kylinos.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1443974AbiAYHSU (ORCPT ); Tue, 25 Jan 2022 02:18:20 -0500 X-UUID: 2c51394019f045a588d334a83e04d3ba-20220125 X-CPASD-INFO: 289dcfeeade14cac8556269bc2fefc8c@e4hzhJCYk5WNhKd9g6asnVhmZWZiYlm xpWyGlZSTZIOVhH5xTWJsXVKBfG5QZWNdYVN_eGpQYl9gZFB5i3-XblBgXoZgUZB3gXpzhJOUlQ== X-CPASD-FEATURE: 0.0 X-CLOUD-ID: 289dcfeeade14cac8556269bc2fefc8c X-CPASD-SUMMARY: SIP:-1,APTIP:-2.0,KEY:0.0,FROMBLOCK:1,EXT:0.0,OB:0.0,URL:-5,T VAL:185.0,ESV:0.0,ECOM:-5.0,ML:0.0,FD:0.0,CUTS:127.0,IP:-2.0,MAL:0.0,ATTNUM:0 .0,PHF:-5.0,PHC:-5.0,SPF:4.0,EDMS:-3,IPLABEL:4488.0,FROMTO:0,AD:0,FFOB:0.0,CF OB:0.0,SPC:0.0,SIG:-5,AUF:103,DUF:31675,ACD:174,DCD:276,SL:0,AG:0,CFC:0.714,C FSR:0.104,UAT:0,RAF:0,VERSION:2.3.4 X-CPASD-ID: 2c51394019f045a588d334a83e04d3ba-20220125 X-CPASD-BLOCK: 1000 X-CPASD-STAGE: 1, 1 X-UUID: 2c51394019f045a588d334a83e04d3ba-20220125 X-User: yinxiujiang@kylinos.cn Received: from localhost.localdomain [(118.26.139.139)] by nksmu.kylinos.cn (envelope-from ) (Generic MTA) with ESMTP id 1238024265; Tue, 25 Jan 2022 15:30:57 +0800 From: Yin Xiujiang To: mareklindner@neomailbox.ch, sw@simonwunderlich.de, a@unstable.cc, sven@narfation.org, davem@davemloft.net, kuba@kernel.org Cc: b.a.t.m.a.n@lists.open-mesh.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] batman-adv: Make use of the helper macro kthread_run() Date: Tue, 25 Jan 2022 15:18:08 +0800 Message-Id: <20220125071808.459017-1-yinxiujiang@kylinos.cn> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Repalce kthread_create/wake_up_process() with kthread_run() to simplify the code. Signed-off-by: Yin Xiujiang --- 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