Commit 80754539 authored by Russell King's avatar Russell King Committed by Herbert Xu

crypto: marvell/cesa - easier way to get the transform

There's an easier way to get at the hash transform - rather than
using crypto_ahash_tfm(ahash), we can get it directly from
req->base.tfm.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 524e56c3
...@@ -805,7 +805,7 @@ static int mv_cesa_ahash_export(struct ahash_request *req, void *hash, ...@@ -805,7 +805,7 @@ static int mv_cesa_ahash_export(struct ahash_request *req, void *hash,
unsigned int digsize = crypto_ahash_digestsize(ahash); unsigned int digsize = crypto_ahash_digestsize(ahash);
unsigned int blocksize; unsigned int blocksize;
blocksize = crypto_tfm_alg_blocksize(crypto_ahash_tfm(ahash)); blocksize = crypto_ahash_blocksize(ahash);
*len = creq->len; *len = creq->len;
memcpy(hash, creq->state, digsize); memcpy(hash, creq->state, digsize);
...@@ -830,7 +830,7 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash, ...@@ -830,7 +830,7 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash,
if (ret) if (ret)
return ret; return ret;
blocksize = crypto_tfm_alg_blocksize(crypto_ahash_tfm(ahash)); blocksize = crypto_ahash_blocksize(ahash);
if (len >= blocksize) if (len >= blocksize)
mv_cesa_update_op_cfg(&creq->op_tmpl, mv_cesa_update_op_cfg(&creq->op_tmpl,
CESA_SA_DESC_CFG_MID_FRAG, CESA_SA_DESC_CFG_MID_FRAG,
......
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