Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp401765pxb; Thu, 21 Oct 2021 01:40:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygAxwKKgdE1s540kYPGKKyvSJWxd3nn0qHQHlm72UrB9NgVVmuBoJ6IYQIHtgh3ZLaPo9K X-Received: by 2002:a17:90a:bf09:: with SMTP id c9mr2302047pjs.203.1634805600766; Thu, 21 Oct 2021 01:40:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634805600; cv=none; d=google.com; s=arc-20160816; b=irSSU/vauBnCCVozw1ST6aK0n28kLxbAtigX1Dl/9hIb77faeojNFbuDgbwehCAclC df8eN29IjdQySYQgs2BbX/cRDjtPjCki91zVyz8JG501+1N8V7LeHY1CSNxemM6spbNC bkjNHBq9tgwgNI96rDriA9XU0x96nY1HUZdZyjEGZCh4GizTfW1taglO3HKWmJDp5E7N qPlFmZZVRUo1DwWRS1ZJCrDtQgpR2+kgpf3AUs+Hk7dRMa3e/qxoDUtXjJ7Ezs+Xi8cR e3Medu7cJVVbL97QWi/3+dq2zvogM4csYDRMbgFab93mkZTLK7zRDsw2DX81D+PVcIkR DeDQ== 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=Rck2jlaAPCFyrhtMRGcgABHILm1l7qnemtUuSKr+LUU=; b=UTvIJEihunQpOlPdgTe6MjpPQMo/Ga/y1Qj3/xuxcZLNvrGt2F0ydfF6xejvDQyDwd 1beCOn1qpcNTv8v89Exgx9rJbmkyUXIIzwKnEfl/KfxTqne84g3gRqxQOKY5+zupHLaw ikLygMwDQQtqAmbsCBUCOOoayg/q15WFgKMRdNiU4KOsY6drpflmSyoEkXbU34NP7ovy EtMGGDekBHBbhY4/eVh0JONTJqgv4AdZ+z7dqKFDkraeH309CEanCHAesM970F4ruBBQ kxfC18Tdcxx3fGucxfRrHprH0kt7qI81ldBkXwxVaKLv4Q5Lor0Vr64ZidcEK+0xao7X QNcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 nu15si12254526pjb.179.2021.10.21.01.39.11; Thu, 21 Oct 2021 01:40:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231452AbhJUIlO (ORCPT + 99 others); Thu, 21 Oct 2021 04:41:14 -0400 Received: from mx22.baidu.com ([220.181.50.185]:42944 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231268AbhJUIlN (ORCPT ); Thu, 21 Oct 2021 04:41:13 -0400 Received: from BJHW-Mail-Ex13.internal.baidu.com (unknown [10.127.64.36]) by Forcepoint Email with ESMTPS id EE4B11267F187F0A31EA; Thu, 21 Oct 2021 16:38:56 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex13.internal.baidu.com (10.127.64.36) 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:38:56 +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:38:56 +0800 From: Cai Huoqing To: CC: Tom Lendacky , John Allen , Herbert Xu , "David S. Miller" , , Subject: [PATCH] crypto: ccp - Make use of the helper macro kthread_run() Date: Thu, 21 Oct 2021 16:38:54 +0800 Message-ID: <20211021083854.1865-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) X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex13_2021-10-21 16:38:56:990 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Repalce kthread_create/wake_up_process() with kthread_run() to simplify the code. Signed-off-by: Cai Huoqing --- drivers/crypto/ccp/ccp-dev-v3.c | 5 ++--- drivers/crypto/ccp/ccp-dev-v5.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c index 0d5576f6ad21..fe69053b2394 100644 --- a/drivers/crypto/ccp/ccp-dev-v3.c +++ b/drivers/crypto/ccp/ccp-dev-v3.c @@ -467,8 +467,8 @@ static int ccp_init(struct ccp_device *ccp) cmd_q = &ccp->cmd_q[i]; - kthread = kthread_create(ccp_cmd_queue_thread, cmd_q, - "%s-q%u", ccp->name, cmd_q->id); + kthread = kthread_run(ccp_cmd_queue_thread, cmd_q, + "%s-q%u", ccp->name, cmd_q->id); if (IS_ERR(kthread)) { dev_err(dev, "error creating queue thread (%ld)\n", PTR_ERR(kthread)); @@ -477,7 +477,6 @@ static int ccp_init(struct ccp_device *ccp) } cmd_q->kthread = kthread; - wake_up_process(kthread); } dev_dbg(dev, "Enabling interrupts...\n"); diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index 7838f63bab32..7b73332d6aa1 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -950,8 +950,8 @@ static int ccp5_init(struct ccp_device *ccp) cmd_q = &ccp->cmd_q[i]; - kthread = kthread_create(ccp_cmd_queue_thread, cmd_q, - "%s-q%u", ccp->name, cmd_q->id); + kthread = kthread_run(ccp_cmd_queue_thread, cmd_q, + "%s-q%u", ccp->name, cmd_q->id); if (IS_ERR(kthread)) { dev_err(dev, "error creating queue thread (%ld)\n", PTR_ERR(kthread)); @@ -960,7 +960,6 @@ static int ccp5_init(struct ccp_device *ccp) } cmd_q->kthread = kthread; - wake_up_process(kthread); } dev_dbg(dev, "Enabling interrupts...\n"); -- 2.25.1