Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4064239pxb; Sun, 24 Oct 2021 18:56:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJSIEUrFQxfyMlhLjv/cyWfHKRWk4+DQsC3wK3pEcCZCKG5LsHqUqrJunhzfwFVUt874X5 X-Received: by 2002:a05:6402:1644:: with SMTP id s4mr20925556edx.181.1635126984617; Sun, 24 Oct 2021 18:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635126984; cv=none; d=google.com; s=arc-20160816; b=Cb7B3x/Q05nDlhpRRover+e0+/OOgSxRLVamh4Hxtpx1E3Ni9LVC477mkYfczSBKBo LcgXFAZdw/7fF/UxrV3pF74tQKhTgLlN7GchrBL5cP5RvgRd3BG+X3YyFVdQWKV+nR9E 68Xevl+FuyP2nBYAsWhw9zwQygSsxoSvc5Y0RG2lchUStNYfEaIKRCr3YQvw6W9uYxkl Vx/okc2fy1emLs35nKfRPsSBSS3diJ4iIUE+hX49KVWdm3hmkoPYjV8Po/BOWd27M905 qAkBZhybDofAo04hm5n0lWJMHibJACUiy8C3jSRSsI+u6c+i8iP9R3L4hHpUaWL3XDyV Xutw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=PwRdhp4t/0vg/0uNMP1xQWeAljD9SjKwnizaqisCd40=; b=velkcPYq00p/Ycv0lQP6sgALJfauHGbo0RKPNTn14RDdBYwoNgjyk7C8JYerG6p+01 ryKSY21mi3Ct5zAA0TvNxTvSX7orwLvWk6ZOJPFdW0y0duYYtrgSS/E4E05PUI7Xc3Q/ k7QGYgja0FkCqMRVBAKHGG++t46yX73bUaG9wLjfZ0GhjB1MdH+Gn0zbopezzDWC5vSX w34ak+GeeD1AAyTD9BfheNmEHQMo18dNio3YLfhtXtuKiPg5u79xojfBC6TLb1uTE0zf 46S+VvPQZGPZOzpfoTcUZ1u1AXqFgJg/oMZMtlsKBlnHh+2DPB8AygtfxUvYTCtNbg8a wr9A== 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 az7si5095194ejc.10.2021.10.24.18.55.58; Sun, 24 Oct 2021 18:56:24 -0700 (PDT) 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 S231960AbhJYB4M (ORCPT + 99 others); Sun, 24 Oct 2021 21:56:12 -0400 Received: from mx22.baidu.com ([220.181.50.185]:42584 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229706AbhJYB4L (ORCPT ); Sun, 24 Oct 2021 21:56:11 -0400 Received: from BC-Mail-EX08.internal.baidu.com (unknown [172.31.51.48]) by Forcepoint Email with ESMTPS id 30846EB9DBE718AAD120; Mon, 25 Oct 2021 09:53:44 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX08.internal.baidu.com (172.31.51.48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Mon, 25 Oct 2021 09:53:43 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Mon, 25 Oct 2021 09:53:43 +0800 From: Cai Huoqing To: CC: Cai Huoqing , Saurav Kashyap , Javed Hasan , , "James E.J. Bottomley" , "Martin K. Petersen" , , Subject: [PATCH v2] scsi: bnx2fc: Make use of the helper macro kthread_run() Date: Mon, 25 Oct 2021 09:53:45 +0800 Message-ID: <20211025015347.166-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex05.internal.baidu.com (10.127.64.15) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace kthread_create/wake_up_process() with kthread_run() to simplify the code. Signed-off-by: Cai Huoqing --- v1->v2: *Remove wake_up_process() *Fix typo in changelog, Repalce->Replace drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 71fa62bd3083..69488f1b2349 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -2723,14 +2723,12 @@ static int __init bnx2fc_mod_init(void) bg = &bnx2fc_global; skb_queue_head_init(&bg->fcoe_rx_list); - l2_thread = kthread_create(bnx2fc_l2_rcv_thread, - (void *)bg, - "bnx2fc_l2_thread"); + l2_thread = kthread_run(bnx2fc_l2_rcv_thread, + (void *)bg, "bnx2fc_l2_thread"); if (IS_ERR(l2_thread)) { rc = PTR_ERR(l2_thread); goto free_wq; } - wake_up_process(l2_thread); spin_lock_bh(&bg->fcoe_rx_list.lock); bg->kthread = l2_thread; spin_unlock_bh(&bg->fcoe_rx_list.lock); -- 2.25.1