Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp404454pxb; Thu, 21 Oct 2021 01:43:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVbarTH8OHah6oxuPAFGS6pc4yR2vbs3q8bN3iytuk5cahAOsoWrogbrfXRZsuF/VLZzNL X-Received: by 2002:a17:903:248f:b029:128:d5ea:18a7 with SMTP id p15-20020a170903248fb0290128d5ea18a7mr3960134plw.83.1634805836408; Thu, 21 Oct 2021 01:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634805836; cv=none; d=google.com; s=arc-20160816; b=UjFX87I0UNHo2yBMb3+hsdajKR0fJgcQ7m94AFQefhlcwEp8yM2A1quvn3dUuljVLS ynz4gBBGWODNR97aY36M7s3YuyEVP9tOOK7P1mtvwXXJ6AjmZpvDwkflR4AB66UsxK7b g50uyVXSxX29ZrKh+jdu9/aE91SKVsbqhU9mc30M8KrQAL5FJvr1geTiig8OUNElFHiN CiLInNI/tK/FLrXip+jhygZOUxpAcCc/8Cmwwfd6s8E6qWhvcgmx1l8f9R8t3Yd7Lbeb RZcM/qzWY9GBWfb7kwhnu+ph9JTDCvYg3MN/4wJNX3bOH8KKiF1V97Er87vi3Ws0zMO3 HgXA== 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=mGuES0GQrfM+YeSjfYCZfOKRb2Q/aq6iv6Y5WGlZp00=; b=tRk+oVYFIB4HQR4QOvHJ53G8GsfHW8ujqQqEqqiRWDp87DJOOGV3WDSTmC/XeVyGCf hAFlyDHdIPEc+4h7wHQzELA1NfOWmg6sjN9IYSaaH5fRgnCXwaKCFC3Om5AE/9moN3h8 9Jk/GwEl4WxGLWehuntP858LFAchfynv1JtIIkTdeD/YmNmXoB+5+Evuj2jzQUuOnM+b 5ocnapnmCLsMQt8LVSEy1XFKJ+gIWVUiNJ0ErdbhInrsaI3T7cU/HB5WwDq628jfkiAi zbf2y6Dl2Q2bQgwEHjK6aduBRQ3T9uQnBLE5cyIXdfV+Ae4Zw40E/jpWtjw1cCnN88cZ oO9A== 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 u14si7623603pfk.23.2021.10.21.01.43.41; Thu, 21 Oct 2021 01:43:56 -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 S231473AbhJUIoT (ORCPT + 99 others); Thu, 21 Oct 2021 04:44:19 -0400 Received: from mx24.baidu.com ([111.206.215.185]:45580 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231459AbhJUIoR (ORCPT ); Thu, 21 Oct 2021 04:44:17 -0400 Received: from BC-Mail-Ex12.internal.baidu.com (unknown [172.31.51.52]) by Forcepoint Email with ESMTPS id E6DB256BB77BCB746554; Thu, 21 Oct 2021 16:42:00 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex12.internal.baidu.com (172.31.51.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Thu, 21 Oct 2021 16:42:00 +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; Thu, 21 Oct 2021 16:42:00 +0800 From: Cai Huoqing To: CC: Derek Chickles , Satanand Burla , Felix Manlunas , "David S. Miller" , Jakub Kicinski , , Subject: [PATCH] net: liquidio: Make use of the helper macro kthread_run() Date: Thu, 21 Oct 2021 16:41:58 +0800 Message-ID: <20211021084158.2183-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: BC-Mail-EX02.internal.baidu.com (172.31.51.42) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) 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: Cai Huoqing --- drivers/net/ethernet/cavium/liquidio/lio_main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c index 1daf63e437ce..12eee2bc7f5c 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c @@ -892,12 +892,11 @@ liquidio_probe(struct pci_dev *pdev, const struct pci_device_id __maybe_unused * bus = pdev->bus->number; device = PCI_SLOT(pdev->devfn); function = PCI_FUNC(pdev->devfn); - oct_dev->watchdog_task = kthread_create( - liquidio_watchdog, oct_dev, - "liowd/%02hhx:%02hhx.%hhx", bus, device, function); - if (!IS_ERR(oct_dev->watchdog_task)) { - wake_up_process(oct_dev->watchdog_task); - } else { + oct_dev->watchdog_task = kthread_run(liquidio_watchdog, + oct_dev, + "liowd/%02hhx:%02hhx.%hhx", + bus, device, function); + if (IS_ERR(oct_dev->watchdog_task)) { oct_dev->watchdog_task = NULL; dev_err(&oct_dev->pci_dev->dev, "failed to create kernel_thread\n"); -- 2.25.1