From patchwork Tue Aug 8 12:03:35 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: 109617 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp3982698obb; Tue, 8 Aug 2017 05:05:10 -0700 (PDT) X-Received: by 10.99.189.10 with SMTP id a10mr3911656pgf.271.1502193910383; Tue, 08 Aug 2017 05:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502193910; cv=none; d=google.com; s=arc-20160816; b=Eb0hE3Wqt4CsF/CAa+QldeoCar3qGx6RXAXeGcVomQETVBAbQmaNuywTLkdhkbXH/L w8jGMPL5MOnpmSgWyb+56GiZD9e3gFAQfWYaOIvK0Nc26EnMglCZKMGz2M1jHKRKDDOG xW7W72BE8JsuFYQVrtcLtY36Ahx5CH3HFBnfH+p+ikuxtWeq++NUp0xDXzldCNkRujtY GYfnm651QgowPq+hIV6xLdzXRXcLiHwNuKQgdjduqPrYPxHdh7Zr5y1E9tJVh3+N+D9R NqZBHX3EoUNqOESwFallgV1fv64TrHfqe25r6SF8WdcOFqb7c7pmNAUxCFi1LCk4+wb9 751g== 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=MkxA8W48MV7k48NGoJLxibZ3RRBf5zXHPa/E/3CqHN0=; b=fykIGSyBZctDnddN4FZFeQQRtuBcS6okBONVhF3NSlHA06thVnxMABtuk035LmRIJe ezFu8JaDrvdpE/K0Rx407fiDgVaGGbwkLp1R7jOWWXeQ2EtOPrHG7wwTNGHPfawMTtUt RdZrr6J8Zpw8rWovNs/UkjPnAqKLx/9mZt8lXg6354lyhQiL8D0eWcupwXbaj8pHAGyu Z894DhgKfF/NuW5LOKqMQ1Gw09NDW1fs5utxyYDrrrtrzVaTpxcES0g6Np0DTpFc5Te0 VrV6PpjIFIeOiKypT6Jf+78gbJuqJvMJnG5czaQvJ/H8Y+0SBrMNvFvMYiTrFyvbZ3ky WHeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 s6si715553pgr.554.2017.08.08.05.05.10; Tue, 08 Aug 2017 05:05:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752589AbdHHMFG (ORCPT + 25 others); Tue, 8 Aug 2017 08:05:06 -0400 Received: from foss.arm.com ([217.140.101.70]:33396 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752345AbdHHMFB (ORCPT ); Tue, 8 Aug 2017 08:05:01 -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 84F5216A0; Tue, 8 Aug 2017 05:05:00 -0700 (PDT) Received: from gby.kfn.arm.com (unknown [10.45.48.154]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 89D353F577; Tue, 8 Aug 2017 05:04:52 -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 , 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, linux-ima-devel@lists.sourceforge.net, linux-ima-user@lists.sourceforge.net, linux-security-module@vger.kernel.org Cc: Ofir Drang Subject: [PATCH v4 04/19] crypto: marvell/cesa: remove redundant backlog checks on EBUSY Date: Tue, 8 Aug 2017 15:03:35 +0300 Message-Id: <1502193834-11289-5-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1502193834-11289-1-git-send-email-gilad@benyossef.com> References: <1502193834-11289-1-git-send-email-gilad@benyossef.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- 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..269737f 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 */