From patchwork Sun Oct 15 09:19:50 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: 115864 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2528717qgn; Sun, 15 Oct 2017 02:22:32 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDMfJTNLuoiDEBtb/Ilql02w3d+nQbXUPKs3eH5eMaXre93SGit9/3MmjE7BDs6AtfeUX18 X-Received: by 10.159.254.20 with SMTP id r20mr5939892pls.16.1508059352246; Sun, 15 Oct 2017 02:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508059352; cv=none; d=google.com; s=arc-20160816; b=pmnOqtAQ/OOgacboSQFFY75VUUSsRrXeG1FS/TFES5PtZN2Bht87z1w8zvAUdQRyOP UUoM2gRtoHLnct+O+otqdhnHYeAP1Hc3MV/c1wdnccpA+/JtxNXaWibHznw+dxav+iSQ 3c5SvIrbsyoFoYCFcju31VZkUiZYa7YOGgHkd8pkDwzueAtRIMkbr0wZTfPSRc1ehIRQ JQ3tWRYvWbXlWeeyiihFRqnuaSDQJ8jWoDjrCAYiVjeya3vgjo4Yk2bqrPKqyKIMjjY+ MlpQM3es9WVStK0bsYtoGHDwlatpdwDwc6aew7p2qIXe9i+G0/KhyCSO++5NTWNdNI5z x0fw== 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=LFdLIGhk89Nk3xz3nzAcr4UBIYZLnnWiktWdiwd9iDw=; b=vqYGJlVmIywHO02NHQkrnzcR1WlH/FPpogA1fPQqz3lMXTiVog/y1CkzDmpOHE4eLE hnVnUA0fEQTew9QPJCxzeM6kimpG04ilYxtv+VrEalrlnnScg6YW+ezO7/G0KO3nZ+CM gnchhP0Y/sQqFYkgypvfxsh8rxAm4nOOx3jo2l14JN3Gg9Mu3iBLd4EwRyVWobWE8GL7 62i7yFxRpnwuR0kZDtv2MZfDb9VJJLpMd28J64jsAuJe8gKWzsnydQ4fsMS9oW2YwY8c NbobOqpxKoaDvAvDkdpwxtWlu0Z3a5ej5/ftRSQX5H+TBU1dE9TGhnLaY44Glbbcc8C7 eoaA== 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 q1si3091255plk.551.2017.10.15.02.22.32; Sun, 15 Oct 2017 02:22:32 -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 S1752094AbdJOJWa (ORCPT + 1 other); Sun, 15 Oct 2017 05:22:30 -0400 Received: from foss.arm.com ([217.140.101.70]:47404 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753AbdJOJW0 (ORCPT ); Sun, 15 Oct 2017 05:22:26 -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 DEB1B168F; Sun, 15 Oct 2017 02:22:25 -0700 (PDT) Received: from localhost.localdomain (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0254B3F3E1; Sun, 15 Oct 2017 02:22:16 -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, Steve French , "Theodore Y. Ts'o" , Jaegeuk Kim , Steffen Klassert , Alexey Kuznetsov , Hideaki YOSHIFUJI , Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" Cc: Ofir Drang , 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-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 Subject: [PATCH v9 05/20] crypto: marvell/cesa: remove redundant backlog checks on EBUSY Date: Sun, 15 Oct 2017 10:19:50 +0100 Message-Id: <1508059209-25529-6-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508059209-25529-1-git-send-email-gilad@benyossef.com> References: <1508059209-25529-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.7.4 diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c index b657e7c..ff73aa5 100644 --- a/drivers/crypto/marvell/cesa.c +++ b/drivers/crypto/marvell/cesa.c @@ -181,8 +181,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 */