All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Herbert Xu" <herbert@gondor.apana.org.au>
To: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Tudor Ambarus <tudor.ambarus@microchip.com>,
	Jesper Nilsson <jesper.nilsson@axis.com>,
	Lars Persson <lars.persson@axis.com>,
	linux-arm-kernel@axis.com,
	Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>,
	George Cherian <gcherian@marvell.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	John Allen <john.allen@amd.com>,
	Ayush Sawal <ayush.sawal@chelsio.com>,
	Kai Ye <yekai13@huawei.com>,
	Longfang Liu <liulongfang@huawei.com>,
	Antoine Tenart <atenart@kernel.org>,
	Corentin Labbe <clabbe@baylibre.com>,
	Boris Brezillon <bbrezillon@kernel.org>,
	Arnaud Ebalard <arno@natisbad.org>,
	Srujana Challa <schalla@marvell.com>,
	Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
	qat-linux@intel.com, Thara Gopinath <thara.gopinath@gmail.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Vladimir Zapolskiy <vz@mleia.com>
Subject: [PATCH 17/32] crypto: ccp - Use request_complete helpers
Date: Tue, 31 Jan 2023 16:02:19 +0800	[thread overview]
Message-ID: <E1pMlat-005vmv-9T@formenos.hmeau.com> (raw)
In-Reply-To: Y9jKmRsdHsIwfFLo@gondor.apana.org.au

Use the request_complete helpers instead of calling the completion
function directly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---

 drivers/crypto/ccp/ccp-crypto-main.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/crypto/ccp/ccp-crypto-main.c b/drivers/crypto/ccp/ccp-crypto-main.c
index 73442a382f68..ecd58b38c46e 100644
--- a/drivers/crypto/ccp/ccp-crypto-main.c
+++ b/drivers/crypto/ccp/ccp-crypto-main.c
@@ -146,7 +146,7 @@ static void ccp_crypto_complete(void *data, int err)
 		/* Only propagate the -EINPROGRESS if necessary */
 		if (crypto_cmd->ret == -EBUSY) {
 			crypto_cmd->ret = -EINPROGRESS;
-			req->complete(req, -EINPROGRESS);
+			crypto_request_complete(req, -EINPROGRESS);
 		}
 
 		return;
@@ -159,18 +159,18 @@ static void ccp_crypto_complete(void *data, int err)
 	held = ccp_crypto_cmd_complete(crypto_cmd, &backlog);
 	if (backlog) {
 		backlog->ret = -EINPROGRESS;
-		backlog->req->complete(backlog->req, -EINPROGRESS);
+		crypto_request_complete(backlog->req, -EINPROGRESS);
 	}
 
 	/* Transition the state from -EBUSY to -EINPROGRESS first */
 	if (crypto_cmd->ret == -EBUSY)
-		req->complete(req, -EINPROGRESS);
+		crypto_request_complete(req, -EINPROGRESS);
 
 	/* Completion callbacks */
 	ret = err;
 	if (ctx->complete)
 		ret = ctx->complete(req, ret);
-	req->complete(req, ret);
+	crypto_request_complete(req, ret);
 
 	/* Submit the next cmd */
 	while (held) {
@@ -186,12 +186,12 @@ static void ccp_crypto_complete(void *data, int err)
 		ctx = crypto_tfm_ctx_dma(held->req->tfm);
 		if (ctx->complete)
 			ret = ctx->complete(held->req, ret);
-		held->req->complete(held->req, ret);
+		crypto_request_complete(held->req, ret);
 
 		next = ccp_crypto_cmd_complete(held, &backlog);
 		if (backlog) {
 			backlog->ret = -EINPROGRESS;
-			backlog->req->complete(backlog->req, -EINPROGRESS);
+			crypto_request_complete(backlog->req, -EINPROGRESS);
 		}
 
 		kfree(held);

  parent reply	other threads:[~2023-01-31  8:02 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31  8:00 [PATCH 0/32] crypto: api - Prepare to change callback argument to void star Herbert Xu
2023-01-31  8:01 ` [PATCH 1/32] crypto: api - Add scaffolding to change completion function signature Herbert Xu
2023-02-01 16:41   ` Giovanni Cabiddu
2023-01-31  8:01 ` [PATCH 2/32] crypto: cryptd - Use subreq for AEAD Herbert Xu
2023-02-08  5:53   ` [v2 PATCH " Herbert Xu
2023-01-31  8:01 ` [PATCH 3/32] crypto: acompress - Use crypto_request_complete Herbert Xu
2023-02-01 16:45   ` Giovanni Cabiddu
2023-01-31  8:01 ` [PATCH 4/32] crypto: aead " Herbert Xu
2023-01-31  8:01 ` [PATCH 5/32] crypto: akcipher " Herbert Xu
2023-01-31  8:01 ` [PATCH 6/32] crypto: hash " Herbert Xu
2023-02-10 12:20   ` [v2 PATCH " Herbert Xu
2023-01-31  8:01 ` [PATCH 7/32] crypto: kpp " Herbert Xu
2023-01-31  8:02 ` [PATCH 8/32] crypto: skcipher " Herbert Xu
2023-01-31  8:02 ` [PATCH 9/32] crypto: engine " Herbert Xu
2023-01-31  8:02 ` [PATCH 10/32] crypto: rsa-pkcs1pad - Use akcipher_request_complete Herbert Xu
2023-01-31  8:02 ` [PATCH 11/32] crypto: cryptd - Use request_complete helpers Herbert Xu
2023-02-08  5:56   ` [v2 PATCH " Herbert Xu
2023-01-31  8:02 ` [PATCH 12/32] crypto: atmel " Herbert Xu
2023-01-31  8:02 ` [PATCH 13/32] crypto: artpec6 " Herbert Xu
2023-02-08  7:20   ` Jesper Nilsson
2023-01-31  8:02 ` [PATCH 14/32] crypto: bcm " Herbert Xu
2023-01-31  8:02 ` [PATCH 15/32] crypto: cpt " Herbert Xu
2023-01-31  8:02 ` [PATCH 16/32] crypto: nitrox " Herbert Xu
2023-01-31  8:02 ` Herbert Xu [this message]
2023-01-31 15:21   ` [PATCH 17/32] crypto: ccp " Tom Lendacky
2023-01-31  8:02 ` [PATCH 18/32] crypto: chelsio " Herbert Xu
2023-01-31  8:02 ` [PATCH 19/32] crypto: hifn_795x " Herbert Xu
2023-01-31  8:02 ` [PATCH 20/32] crypto: hisilicon " Herbert Xu
2023-01-31  8:02 ` [PATCH 21/32] crypto: img-hash " Herbert Xu
2023-01-31  8:02 ` [PATCH 22/32] crypto: safexcel " Herbert Xu
2023-01-31  8:02 ` [PATCH 23/32] crypto: ixp4xx " Herbert Xu
2023-01-31  8:02 ` [PATCH 24/32] crypto: marvell/cesa " Herbert Xu
2023-01-31  8:02 ` [PATCH 25/32] crypto: octeontx " Herbert Xu
2023-01-31  8:02 ` [PATCH 26/32] crypto: octeontx2 " Herbert Xu
2023-01-31  8:02 ` [PATCH 27/32] crypto: mxs-dcp " Herbert Xu
2023-01-31  8:02 ` [PATCH 28/32] crypto: qat " Herbert Xu
2023-02-01 16:57   ` Giovanni Cabiddu
2023-01-31  8:02 ` [PATCH 29/32] crypto: qce " Herbert Xu
2023-01-31  8:02 ` [PATCH 30/32] crypto: s5p-sss " Herbert Xu
2023-01-31  8:02 ` [PATCH 31/32] crypto: sahara " Herbert Xu
2023-01-31  8:02 ` [PATCH 32/32] crypto: talitos " Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1pMlat-005vmv-9T@formenos.hmeau.com \
    --to=herbert@gondor.apana.org.au \
    --cc=arno@natisbad.org \
    --cc=atenart@kernel.org \
    --cc=ayush.sawal@chelsio.com \
    --cc=bbrezillon@kernel.org \
    --cc=clabbe@baylibre.com \
    --cc=gcherian@marvell.com \
    --cc=giovanni.cabiddu@intel.com \
    --cc=jesper.nilsson@axis.com \
    --cc=john.allen@amd.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lars.persson@axis.com \
    --cc=linux-arm-kernel@axis.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=liulongfang@huawei.com \
    --cc=qat-linux@intel.com \
    --cc=raveendra.padasalagi@broadcom.com \
    --cc=schalla@marvell.com \
    --cc=thara.gopinath@gmail.com \
    --cc=thomas.lendacky@amd.com \
    --cc=tudor.ambarus@microchip.com \
    --cc=vz@mleia.com \
    --cc=yekai13@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.