crypto: caam - Use ahash_request_complete
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 22 Jan 2023 07:32:03 +0000 (15:32 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 27 Jan 2023 10:58:09 +0000 (18:58 +0800)
Instead of calling the base completion function directly, use the
correct ahash helper which is ahash_request_complete.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg_qi2.c
drivers/crypto/caam/caamhash.c

index 0ddef9a..5c8d35e 100644 (file)
@@ -3419,7 +3419,7 @@ static void ahash_done(void *cbk_ctx, u32 status)
                             DUMP_PREFIX_ADDRESS, 16, 4, state->caam_ctx,
                             ctx->ctx_len, 1);
 
-       req->base.complete(&req->base, ecode);
+       ahash_request_complete(req, ecode);
 }
 
 static void ahash_done_bi(void *cbk_ctx, u32 status)
@@ -3457,7 +3457,7 @@ static void ahash_done_bi(void *cbk_ctx, u32 status)
                                     DUMP_PREFIX_ADDRESS, 16, 4, req->result,
                                     crypto_ahash_digestsize(ahash), 1);
 
-       req->base.complete(&req->base, ecode);
+       ahash_request_complete(req, ecode);
 }
 
 static void ahash_done_ctx_src(void *cbk_ctx, u32 status)
@@ -3484,7 +3484,7 @@ static void ahash_done_ctx_src(void *cbk_ctx, u32 status)
                             DUMP_PREFIX_ADDRESS, 16, 4, state->caam_ctx,
                             ctx->ctx_len, 1);
 
-       req->base.complete(&req->base, ecode);
+       ahash_request_complete(req, ecode);
 }
 
 static void ahash_done_ctx_dst(void *cbk_ctx, u32 status)
@@ -3522,7 +3522,7 @@ static void ahash_done_ctx_dst(void *cbk_ctx, u32 status)
                                     DUMP_PREFIX_ADDRESS, 16, 4, req->result,
                                     crypto_ahash_digestsize(ahash), 1);
 
-       req->base.complete(&req->base, ecode);
+       ahash_request_complete(req, ecode);
 }
 
 static int ahash_update_ctx(struct ahash_request *req)
index 1f357f4..82d3c73 100644 (file)
@@ -614,7 +614,7 @@ static inline void ahash_done_cpy(struct device *jrdev, u32 *desc, u32 err,
         * by CAAM, not crypto engine.
         */
        if (!has_bklog)
-               req->base.complete(&req->base, ecode);
+               ahash_request_complete(req, ecode);
        else
                crypto_finalize_hash_request(jrp->engine, req, ecode);
 }
@@ -676,7 +676,7 @@ static inline void ahash_done_switch(struct device *jrdev, u32 *desc, u32 err,
         * by CAAM, not crypto engine.
         */
        if (!has_bklog)
-               req->base.complete(&req->base, ecode);
+               ahash_request_complete(req, ecode);
        else
                crypto_finalize_hash_request(jrp->engine, req, ecode);