crypto: s5p-sss - Use request_complete helpers

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

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Herbert Xu 2023-01-31 16:02:46 +08:00
parent 0cbe89d5d1
commit e94c1c9b43

View File

@ -499,7 +499,7 @@ static void s5p_sg_done(struct s5p_aes_dev *dev)
/* Calls the completion. Cannot be called with dev->lock hold. */ /* Calls the completion. Cannot be called with dev->lock hold. */
static void s5p_aes_complete(struct skcipher_request *req, int err) static void s5p_aes_complete(struct skcipher_request *req, int err)
{ {
req->base.complete(&req->base, err); skcipher_request_complete(req, err);
} }
static void s5p_unset_outdata(struct s5p_aes_dev *dev) static void s5p_unset_outdata(struct s5p_aes_dev *dev)
@ -1355,7 +1355,7 @@ static void s5p_hash_finish_req(struct ahash_request *req, int err)
spin_unlock_irqrestore(&dd->hash_lock, flags); spin_unlock_irqrestore(&dd->hash_lock, flags);
if (req->base.complete) if (req->base.complete)
req->base.complete(&req->base, err); ahash_request_complete(req, err);
} }
/** /**
@ -1397,7 +1397,7 @@ retry:
return ret; return ret;
if (backlog) if (backlog)
backlog->complete(backlog, -EINPROGRESS); crypto_request_complete(backlog, -EINPROGRESS);
req = ahash_request_cast(async_req); req = ahash_request_cast(async_req);
dd->hash_req = req; dd->hash_req = req;
@ -1991,7 +1991,7 @@ static void s5p_tasklet_cb(unsigned long data)
spin_unlock_irqrestore(&dev->lock, flags); spin_unlock_irqrestore(&dev->lock, flags);
if (backlog) if (backlog)
backlog->complete(backlog, -EINPROGRESS); crypto_request_complete(backlog, -EINPROGRESS);
dev->req = skcipher_request_cast(async_req); dev->req = skcipher_request_cast(async_req);
dev->ctx = crypto_tfm_ctx(dev->req->base.tfm); dev->ctx = crypto_tfm_ctx(dev->req->base.tfm);