Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1580220pxb; Fri, 22 Oct 2021 03:52:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL4GD/snwk3yrWITNunXvLhcsZ70CxwSV6VoouHQaSypexZdJNfgo53+/PW8BG1PMVdl8U X-Received: by 2002:a50:be8a:: with SMTP id b10mr16159663edk.235.1634899978018; Fri, 22 Oct 2021 03:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634899978; cv=none; d=google.com; s=arc-20160816; b=miBbzRe3IxMRgJ9gIeZCAU69tYQ/FsreenpJ56+oOfV5jC6N5xkdmMh4ilZLbvHdfr yCpHnBxARH3hKPbkhqCnFhnoho8+kbbQjQkUGwqQn9oFo74dCMoM4u/BLdwdkv9tuPjG bvgHi5EpWO686j3IznpiFZu3Yfygi3cc0mbQEETCMDghf/F+W7eIABEqEUlU/HnH4C6M z5Tgf4p9wRZIMr9qHhQfcpL779u3kU1FjiGJZIyxf10limrQ9emA18j/4Pl6ZBg5JjLj 1JWbIMGa/qSa0veHSCyUb0+G5ajYTmWA1I8EMYEV2saWlzkcBTwmxi72v/N7qtR9Azhf o0sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=eC7SS4ZoDnI3OsD41Cbqc9gqsUN3Dk7llax+7BwRcaU=; b=p6MiD6bhLwkWk84Ds3ajk3KtoxbhNRnDcSdVRkUuLaGVBSjiLVFJnIRITcJyJMZiRj vs5i7SqKvjLUiHzVMM4rj3PeyXGCNN0KkMW6wiGp0pFsnBJpJ6SGOV0YeINWXH+8lzen MSEEPajQ/PBtgfmVHqtbtdugip8hoos44tCHBoGc5Xy0gcA6JnwZ/l+WoV5qZ+CHt/S/ MxL1cc0FSSWoob0wIzZJCL7acbkaUuj0799b4v0S6kmlqsCBxaVrqtu3D9eMczQZOMjP JDapj390duTL/IBWpdycfEBqJyR+oP+q3mTUKF0QWIRGkvqCFXNjLfCOfE7T5J91KLxm 1B6w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m20si13190070edc.499.2021.10.22.03.52.17; Fri, 22 Oct 2021 03:52:58 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232615AbhJVKvb (ORCPT + 99 others); Fri, 22 Oct 2021 06:51:31 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:4021 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232560AbhJVKv3 (ORCPT ); Fri, 22 Oct 2021 06:51:29 -0400 Received: from fraeml734-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4HbLbG36lSz67mY7; Fri, 22 Oct 2021 18:45:14 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml734-chm.china.huawei.com (10.206.15.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Fri, 22 Oct 2021 12:49:09 +0200 Received: from [10.202.227.179] (10.202.227.179) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Fri, 22 Oct 2021 11:49:08 +0100 Subject: Re: [PATCH] scsi: bnx2fc: Make use of the helper macro kthread_run() To: Cai Huoqing CC: Saurav Kashyap , Javed Hasan , , "James E.J. Bottomley" , "Martin K. Petersen" , , References: <20211021084221.2342-1-caihuoqing@baidu.com> From: John Garry Message-ID: <834fa2cc-8a4a-b632-93bb-43d2dfdc4713@huawei.com> Date: Fri, 22 Oct 2021 11:49:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <20211021084221.2342-1-caihuoqing@baidu.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.179] X-ClientProxiedBy: lhreml731-chm.china.huawei.com (10.201.108.82) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/10/2021 09:42, Cai Huoqing wrote: > Repalce kthread_create/wake_up_process() with kthread_run() Replace > to simplify the code. > > Signed-off-by: Cai Huoqing > --- > drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c > index 71fa62bd3083..975512511a60 100644 > --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c > +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c > @@ -2723,9 +2723,8 @@ 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; Are you then supposed to remove the wake_up_process() call also (not shown)? >