mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-09-21 20:22:13 +08:00
crypto: api - Remove no-op exit_ops code
crypto_exit_cipher_ops() and crypto_exit_compress_ops() are no-ops and have been for a long time, so remove them. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
afb5a0a947
commit
9c8ae17bbf
20
crypto/api.c
20
crypto/api.c
@ -310,24 +310,8 @@ static void crypto_exit_ops(struct crypto_tfm *tfm)
|
|||||||
{
|
{
|
||||||
const struct crypto_type *type = tfm->__crt_alg->cra_type;
|
const struct crypto_type *type = tfm->__crt_alg->cra_type;
|
||||||
|
|
||||||
if (type) {
|
if (type && tfm->exit)
|
||||||
if (tfm->exit)
|
tfm->exit(tfm);
|
||||||
tfm->exit(tfm);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (crypto_tfm_alg_type(tfm)) {
|
|
||||||
case CRYPTO_ALG_TYPE_CIPHER:
|
|
||||||
crypto_exit_cipher_ops(tfm);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CRYPTO_ALG_TYPE_COMPRESS:
|
|
||||||
crypto_exit_compress_ops(tfm);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
BUG();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int crypto_ctxsize(struct crypto_alg *alg, u32 type, u32 mask)
|
static unsigned int crypto_ctxsize(struct crypto_alg *alg, u32 type, u32 mask)
|
||||||
|
@ -116,7 +116,3 @@ int crypto_init_cipher_ops(struct crypto_tfm *tfm)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void crypto_exit_cipher_ops(struct crypto_tfm *tfm)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
@ -42,7 +42,3 @@ int crypto_init_compress_ops(struct crypto_tfm *tfm)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void crypto_exit_compress_ops(struct crypto_tfm *tfm)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
@ -76,9 +76,6 @@ struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask);
|
|||||||
int crypto_init_cipher_ops(struct crypto_tfm *tfm);
|
int crypto_init_cipher_ops(struct crypto_tfm *tfm);
|
||||||
int crypto_init_compress_ops(struct crypto_tfm *tfm);
|
int crypto_init_compress_ops(struct crypto_tfm *tfm);
|
||||||
|
|
||||||
void crypto_exit_cipher_ops(struct crypto_tfm *tfm);
|
|
||||||
void crypto_exit_compress_ops(struct crypto_tfm *tfm);
|
|
||||||
|
|
||||||
struct crypto_larval *crypto_larval_alloc(const char *name, u32 type, u32 mask);
|
struct crypto_larval *crypto_larval_alloc(const char *name, u32 type, u32 mask);
|
||||||
void crypto_larval_kill(struct crypto_alg *alg);
|
void crypto_larval_kill(struct crypto_alg *alg);
|
||||||
struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask);
|
struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask);
|
||||||
|
Loading…
Reference in New Issue
Block a user