Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d549e32 authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Herbert Xu
Browse files

crypto: marvell/cesa - remove redundant backlog checks on EBUSY



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: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Acked-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 4e5b0ad5
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -177,8 +177,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);

+1 −1
Original line number Diff line number Diff line
@@ -764,7 +764,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 */