diff options
author | Gaosheng Cui <cuigaosheng1@huawei.com> | 2022-09-23 17:08:21 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-09-30 13:59:13 +0800 |
commit | 5e9578b29aff681ec30a3866c049305e26629a41 (patch) | |
tree | 3a998dab94f12c94ea6bf59e2ba4f3bae11c2b9e /drivers/crypto/bcm | |
parent | edfc7e76d2252eebb98328b23e09336d47810569 (diff) | |
download | linux-5e9578b29aff681ec30a3866c049305e26629a41.tar.gz linux-5e9578b29aff681ec30a3866c049305e26629a41.tar.bz2 linux-5e9578b29aff681ec30a3866c049305e26629a41.zip |
crypto: bcm - Simplify obtain the name for cipher
The crypto_ahash_alg_name(tfm) can obtain the name for cipher in
include/crypto/hash.h, but now the function is not in use, so we
use it to simplify the code, and optimize the code structure.
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/bcm')
-rw-r--r-- | drivers/crypto/bcm/cipher.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c index 053315e260c2..c8c799428fe0 100644 --- a/drivers/crypto/bcm/cipher.c +++ b/drivers/crypto/bcm/cipher.c @@ -1928,7 +1928,7 @@ static int ahash_enqueue(struct ahash_request *req) /* SPU2 hardware does not compute hash of zero length data */ if ((rctx->is_final == 1) && (rctx->total_todo == 0) && (iproc_priv.spu.spu_type == SPU_TYPE_SPU2)) { - alg_name = crypto_tfm_alg_name(crypto_ahash_tfm(tfm)); + alg_name = crypto_ahash_alg_name(tfm); flow_log("Doing %sfinal %s zero-len hash request in software\n", rctx->is_final ? "" : "non-", alg_name); err = do_shash((unsigned char *)alg_name, req->result, @@ -2029,7 +2029,7 @@ static int ahash_init(struct ahash_request *req) * supported by the hardware, we need to handle it in software * by calling synchronous hash functions. */ - alg_name = crypto_tfm_alg_name(crypto_ahash_tfm(tfm)); + alg_name = crypto_ahash_alg_name(tfm); hash = crypto_alloc_shash(alg_name, 0, 0); if (IS_ERR(hash)) { ret = PTR_ERR(hash); |