Commit 0c18d054 authored by Herbert Xu's avatar Herbert Xu

crypto: ccp - Use request_complete helpers

Use the request_complete helpers instead of calling the completion
function directly.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Acked-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ea2fbe3b
...@@ -146,7 +146,7 @@ static void ccp_crypto_complete(void *data, int err) ...@@ -146,7 +146,7 @@ static void ccp_crypto_complete(void *data, int err)
/* Only propagate the -EINPROGRESS if necessary */ /* Only propagate the -EINPROGRESS if necessary */
if (crypto_cmd->ret == -EBUSY) { if (crypto_cmd->ret == -EBUSY) {
crypto_cmd->ret = -EINPROGRESS; crypto_cmd->ret = -EINPROGRESS;
req->complete(req, -EINPROGRESS); crypto_request_complete(req, -EINPROGRESS);
} }
return; return;
...@@ -159,18 +159,18 @@ static void ccp_crypto_complete(void *data, int err) ...@@ -159,18 +159,18 @@ static void ccp_crypto_complete(void *data, int err)
held = ccp_crypto_cmd_complete(crypto_cmd, &backlog); held = ccp_crypto_cmd_complete(crypto_cmd, &backlog);
if (backlog) { if (backlog) {
backlog->ret = -EINPROGRESS; backlog->ret = -EINPROGRESS;
backlog->req->complete(backlog->req, -EINPROGRESS); crypto_request_complete(backlog->req, -EINPROGRESS);
} }
/* Transition the state from -EBUSY to -EINPROGRESS first */ /* Transition the state from -EBUSY to -EINPROGRESS first */
if (crypto_cmd->ret == -EBUSY) if (crypto_cmd->ret == -EBUSY)
req->complete(req, -EINPROGRESS); crypto_request_complete(req, -EINPROGRESS);
/* Completion callbacks */ /* Completion callbacks */
ret = err; ret = err;
if (ctx->complete) if (ctx->complete)
ret = ctx->complete(req, ret); ret = ctx->complete(req, ret);
req->complete(req, ret); crypto_request_complete(req, ret);
/* Submit the next cmd */ /* Submit the next cmd */
while (held) { while (held) {
...@@ -186,12 +186,12 @@ static void ccp_crypto_complete(void *data, int err) ...@@ -186,12 +186,12 @@ static void ccp_crypto_complete(void *data, int err)
ctx = crypto_tfm_ctx_dma(held->req->tfm); ctx = crypto_tfm_ctx_dma(held->req->tfm);
if (ctx->complete) if (ctx->complete)
ret = ctx->complete(held->req, ret); 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); next = ccp_crypto_cmd_complete(held, &backlog);
if (backlog) { if (backlog) {
backlog->ret = -EINPROGRESS; backlog->ret = -EINPROGRESS;
backlog->req->complete(backlog->req, -EINPROGRESS); crypto_request_complete(backlog->req, -EINPROGRESS);
} }
kfree(held); kfree(held);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment