crypto: hisilicon - Use request_complete helpers
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 31 Jan 2023 08:02:25 +0000 (16:02 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 13 Feb 2023 10:34:49 +0000 (18:34 +0800)
Use the request_complete helpers instead of calling the completion
function directly.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/sec/sec_algs.c
drivers/crypto/hisilicon/sec2/sec_crypto.c

index 490e1542305e16fb30ab31eab6b0cf484aa90047..1189effcdad071cc791e560ddf370e947b680099 100644 (file)
@@ -504,8 +504,8 @@ static void sec_skcipher_alg_callback(struct sec_bd_info *sec_resp,
                     kfifo_avail(&ctx->queue->softqueue) >
                     backlog_req->num_elements)) {
                        sec_send_request(backlog_req, ctx->queue);
-                       backlog_req->req_base->complete(backlog_req->req_base,
-                                                       -EINPROGRESS);
+                       crypto_request_complete(backlog_req->req_base,
+                                               -EINPROGRESS);
                        list_del(&backlog_req->backlog_head);
                }
        }
@@ -534,7 +534,7 @@ static void sec_skcipher_alg_callback(struct sec_bd_info *sec_resp,
                if (skreq->src != skreq->dst)
                        dma_unmap_sg(dev, skreq->dst, sec_req->len_out,
                                     DMA_BIDIRECTIONAL);
-               skreq->base.complete(&skreq->base, sec_req->err);
+               skcipher_request_complete(skreq, sec_req->err);
        }
 }
 
index f5bfc9755a4a3eaec843589277584afcb6be8a4f..074e50ef512c117bdbe8904393f9150f5dfde5b5 100644 (file)
@@ -1459,12 +1459,11 @@ static void sec_skcipher_callback(struct sec_ctx *ctx, struct sec_req *req,
                        break;
 
                backlog_sk_req = backlog_req->c_req.sk_req;
-               backlog_sk_req->base.complete(&backlog_sk_req->base,
-                                               -EINPROGRESS);
+               skcipher_request_complete(backlog_sk_req, -EINPROGRESS);
                atomic64_inc(&ctx->sec->debug.dfx.recv_busy_cnt);
        }
 
-       sk_req->base.complete(&sk_req->base, err);
+       skcipher_request_complete(sk_req, err);
 }
 
 static void set_aead_auth_iv(struct sec_ctx *ctx, struct sec_req *req)
@@ -1736,12 +1735,11 @@ static void sec_aead_callback(struct sec_ctx *c, struct sec_req *req, int err)
                        break;
 
                backlog_aead_req = backlog_req->aead_req.aead_req;
-               backlog_aead_req->base.complete(&backlog_aead_req->base,
-                                               -EINPROGRESS);
+               aead_request_complete(backlog_aead_req, -EINPROGRESS);
                atomic64_inc(&c->sec->debug.dfx.recv_busy_cnt);
        }
 
-       a_req->base.complete(&a_req->base, err);
+       aead_request_complete(a_req, err);
 }
 
 static void sec_request_uninit(struct sec_ctx *ctx, struct sec_req *req)