Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751580AbdHOIQv convert rfc822-to-8bit (ORCPT ); Tue, 15 Aug 2017 04:16:51 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:50440 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbdHOIQo (ORCPT ); Tue, 15 Aug 2017 04:16:44 -0400 Date: Tue, 15 Aug 2017 10:16:29 +0200 From: Boris Brezillon To: Gilad Ben-Yossef Cc: Herbert Xu , "David S. Miller" , Jonathan Corbet , David Howells , Tom Lendacky , Gary Hook , 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, Ofir Drang Subject: Re: [PATCH v5 04/19] crypto: marvell/cesa: remove redundant backlog checks on EBUSY Message-ID: <20170815101629.7d323845@bbrezillon> In-Reply-To: <1502724094-23305-5-git-send-email-gilad@benyossef.com> References: <1502724094-23305-1-git-send-email-gilad@benyossef.com> <1502724094-23305-5-git-send-email-gilad@benyossef.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1710 Lines: 43 Le Mon, 14 Aug 2017 18:21:14 +0300, Gilad Ben-Yossef a écrit : > 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(-) > > 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 */