linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/1] crypto: stm32/hash - Fix return issue on update
@ 2017-11-06 22:41 lionel.debieve
  2017-11-10 11:37 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: lionel.debieve @ 2017-11-06 22:41 UTC (permalink / raw)
  To: Herbert Xu, David S . Miller, Maxime Coquelin, Alexandre Torgue,
	linux-crypto, linux-arm-kernel, linux-kernel
  Cc: Benjamin Gaignard, Fabien Dessenne, Ludovic Barre, Lionel Debieve

From: Lionel Debieve <lionel.debieve@st.com>

When data append reached the threshold for processing,
we must inform that processing is on going to wait before
managing the next request.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
---
 drivers/crypto/stm32/stm32-hash.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c
index c462be7..4ca4a26 100644
--- a/drivers/crypto/stm32/stm32-hash.c
+++ b/drivers/crypto/stm32/stm32-hash.c
@@ -895,7 +895,6 @@ static int stm32_hash_enqueue(struct ahash_request *req, unsigned int op)
 static int stm32_hash_update(struct ahash_request *req)
 {
 	struct stm32_hash_request_ctx *rctx = ahash_request_ctx(req);
-	int ret;
 
 	if (!req->nbytes || !(rctx->flags & HASH_FLAGS_CPU))
 		return 0;
@@ -909,12 +908,7 @@ static int stm32_hash_update(struct ahash_request *req)
 		return 0;
 	}
 
-	ret = stm32_hash_enqueue(req, HASH_OP_UPDATE);
-
-	if (rctx->flags & HASH_FLAGS_FINUP)
-		return ret;
-
-	return 0;
+	return stm32_hash_enqueue(req, HASH_OP_UPDATE);
 }
 
 static int stm32_hash_final(struct ahash_request *req)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 1/1] crypto: stm32/hash - Fix return issue on update
  2017-11-06 22:41 [PATCH v2 1/1] crypto: stm32/hash - Fix return issue on update lionel.debieve
@ 2017-11-10 11:37 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2017-11-10 11:37 UTC (permalink / raw)
  To: lionel.debieve
  Cc: David S . Miller, Maxime Coquelin, Alexandre Torgue,
	linux-crypto, linux-arm-kernel, linux-kernel, Benjamin Gaignard,
	Fabien Dessenne, Ludovic Barre

On Mon, Nov 06, 2017 at 11:41:52PM +0100, lionel.debieve@st.com wrote:
> From: Lionel Debieve <lionel.debieve@st.com>
> 
> When data append reached the threshold for processing,
> we must inform that processing is on going to wait before
> managing the next request.
> 
> Signed-off-by: Lionel Debieve <lionel.debieve@st.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-10 11:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 22:41 [PATCH v2 1/1] crypto: stm32/hash - Fix return issue on update lionel.debieve
2017-11-10 11:37 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).