From patchwork Tue Sep 5 12:38:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 111672 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp2783216qge; Tue, 5 Sep 2017 05:40:41 -0700 (PDT) X-Google-Smtp-Source: ADKCNb5QLozcaAlLhFUjMgz31iZY0rmDFdJsmMc3Jf8DjeIovZw5SZv84Pv6/ELM9OkyA+qWRap2 X-Received: by 10.84.129.100 with SMTP id 91mr4265613plb.198.1504615241094; Tue, 05 Sep 2017 05:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504615241; cv=none; d=google.com; s=arc-20160816; b=ceXtqSIcJ/5j8dPR2oHyPpjLua1mpyXib6krWc+G4AKVXVXHY+a8QCg1YeQMRNgA3Q 5O968xS1iKrklA9bsoFi4AwrmFkfDQq7Zzc+ZTJHeFtYlp21Cgs+K5nbqdgELXJY4Skk P5cP7G7xilGaTuwsSF/XuJLN8XNlqQEpmhExPAef+sKuPXJ1yHfn3kTfgEQDeaRcmd6a yRbofGXX/DS82t5arx/ApYQlcliu0BzFOL2CffqMIL7StaM0+upf/gm0wp/jxEZHO4v6 XcAAkr16IETAL507HMUVkfD+h2htQOBBfGwzbwixKFK2pkGcbzUQMu+fsafN4bwuIM3Q uGyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=MDkCDhc9vU1uhczJZHVKCArehMUt8ZvvR7DujJSjcIk=; b=cy8QGizkYlWt+PHAcZDMUGWWPj9O3cIA7HoZ57KMQX33ATJiQ1+y8s6ds2DYn7JX8X K1KVOjj7/DFrqTsU4rEJ47C+w2W3mueGkQ2oJFDrJmAoOKt5NrzHPQ3h/xswZ0IkMGae uYup2jyssFubJzbo6k5tk9vO8+/hYPJwRwIWTXn0sA2GlFbbklKv2Ei7GPNoMaMjPwic mB/RzXDbUErft4/vYorVo69GCsw6TxGijgLc12scg/ZemaV0ey2VpK01IPQHCVbIeTBJ GpU7W80wRVKWEozE37B+BE+hb8qhVheRwsrUdC3k1gGIAFOuXCMo9PnF9fLLZoOz3ZWr t9qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si285728plk.687.2017.09.05.05.40.40; Tue, 05 Sep 2017 05:40:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751285AbdIEMki (ORCPT + 1 other); Tue, 5 Sep 2017 08:40:38 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39172 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbdIEMkd (ORCPT ); Tue, 5 Sep 2017 08:40:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F40C9165C; Tue, 5 Sep 2017 05:40:32 -0700 (PDT) Received: from gby.kfn.arm.com (unknown [10.45.48.140]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F19823F3E1; Tue, 5 Sep 2017 05:40:23 -0700 (PDT) From: Gilad Ben-Yossef To: Herbert Xu , "David S. Miller" , Jonathan Corbet , David Howells , Tom Lendacky , Gary Hook , Boris Brezillon , Arnaud Ebalard , Matthias Brugger , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Shaohua Li , Steve French , "Theodore Y. Ts'o" , Jaegeuk Kim , Steffen Klassert , Alexey Kuznetsov , Hideaki YOSHIFUJI , Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, keyrings@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-raid@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-fscrypt@vger.kernel.org, netdev@vger.kernel.org, linux-ima-devel@lists.sourceforge.net, linux-ima-user@lists.sourceforge.net, linux-security-module@vger.kernel.org Cc: Ofir Drang Subject: [PATCH v8 05/20] crypto: marvell/cesa: remove redundant backlog checks on EBUSY Date: Tue, 5 Sep 2017 15:38:44 +0300 Message-Id: <1504615144-29770-6-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1504615144-29770-1-git-send-email-gilad@benyossef.com> References: <1504615144-29770-1-git-send-email-gilad@benyossef.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef Acked-by: Boris Brezillon --- drivers/crypto/marvell/cesa.c | 3 +-- drivers/crypto/marvell/cesa.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) -- 2.1.4 diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c index 6e7a5c7..0c3909d 100644 --- a/drivers/crypto/marvell/cesa.c +++ b/drivers/crypto/marvell/cesa.c @@ -183,8 +183,7 @@ int mv_cesa_queue_req(struct crypto_async_request *req, spin_lock_bh(&engine->lock); ret = crypto_enqueue_request(&engine->queue, req); if ((mv_cesa_req_get_type(creq) == CESA_DMA_REQ) && - (ret == -EINPROGRESS || - (ret == -EBUSY && req->flags & CRYPTO_TFM_REQ_MAY_BACKLOG))) + (ret == -EINPROGRESS || ret == -EBUSY)) mv_cesa_tdma_chain(engine, creq); spin_unlock_bh(&engine->lock); diff --git a/drivers/crypto/marvell/cesa.h b/drivers/crypto/marvell/cesa.h index b7872f6..63c8457 100644 --- a/drivers/crypto/marvell/cesa.h +++ b/drivers/crypto/marvell/cesa.h @@ -763,7 +763,7 @@ static inline int mv_cesa_req_needs_cleanup(struct crypto_async_request *req, * the backlog and will be processed later. There's no need to * clean it up. */ - if (ret == -EBUSY && req->flags & CRYPTO_TFM_REQ_MAY_BACKLOG) + if (ret == -EBUSY) return false; /* Request wasn't queued, we need to clean it up */