Reviewed-by: Gaurav Jain <gaurav.jain@xxxxxxx> > -----Original Message----- > From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> > Sent: Sunday, January 22, 2023 1:02 PM > To: Linux Crypto Mailing List <linux-crypto@xxxxxxxxxxxxxxx>; Horia Geanta > <horia.geanta@xxxxxxx>; Pankaj Gupta <pankaj.gupta@xxxxxxx>; Gaurav Jain > <gaurav.jain@xxxxxxx> > Subject: [EXT] [PATCH] crypto: caam - Use ahash_request_complete > > Caution: EXT Email > > Instead of calling the base completion function directly, use the correct ahash > helper which is ahash_request_complete. > > Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> > > diff --git a/drivers/crypto/caam/caamalg_qi2.c > b/drivers/crypto/caam/caamalg_qi2.c > index 0ddef9a033a1..5c8d35edaa1c 100644 > --- a/drivers/crypto/caam/caamalg_qi2.c > +++ b/drivers/crypto/caam/caamalg_qi2.c > @@ -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) diff --git > a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index > 1f357f48c473..82d3c730a502 100644 > --- a/drivers/crypto/caam/caamhash.c > +++ b/drivers/crypto/caam/caamhash.c > @@ -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); > > -- > Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: > https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgondor.ap > ana.org.au%2F~herbert%2F&data=05%7C01%7Cgaurav.jain%40nxp.com%7C2c > 291da8543f4910bd3b08dafc4ac495%7C686ea1d3bc2b4c6fa92cd99c5c301635% > 7C0%7C0%7C638099695322344265%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiM > C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7 > C%7C%7C&sdata=hWeStOfWJ6Ukmo%2FeqL%2BRuLstFvJAjtByuGesO73BY0M% > 3D&reserved=0 > PGP Key: > https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgondor.ap > ana.org.au%2F~herbert%2Fpubkey.txt&data=05%7C01%7Cgaurav.jain%40nxp.c > om%7C2c291da8543f4910bd3b08dafc4ac495%7C686ea1d3bc2b4c6fa92cd99c5 > c301635%7C0%7C0%7C638099695322500501%7CUnknown%7CTWFpbGZsb3d8 > eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D% > 7C3000%7C%7C%7C&sdata=qCab7Bd9xy2uQAgWO3QsxzwHSOYGUM3uEary7b > %2FSeTY%3D&reserved=0