crypto: api - Remove no-op exit_ops code
authorEric Biggers <ebiggers@google.com>
Fri, 7 Oct 2016 21:13:35 +0000 (14:13 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Oct 2016 03:03:42 +0000 (11:03 +0800)
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>
crypto/api.c
crypto/cipher.c
crypto/compress.c
crypto/internal.h

index bbc147cb5dec87affad82510412459c075056f86..a88729ffe4bdf876aa5b27158220bd4695092115 100644 (file)
@@ -310,24 +310,8 @@ static void crypto_exit_ops(struct crypto_tfm *tfm)
 {
        const struct crypto_type *type = tfm->__crt_alg->cra_type;
 
-       if (type) {
-               if (tfm->exit)
-                       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();
-       }
+       if (type && tfm->exit)
+               tfm->exit(tfm);
 }
 
 static unsigned int crypto_ctxsize(struct crypto_alg *alg, u32 type, u32 mask)
index 39541e0e537dc6f94bc470344451fdb2ac6b4476..94fa3551476bab62cfd24f0ade314c74d7d88c24 100644 (file)
@@ -116,7 +116,3 @@ int crypto_init_cipher_ops(struct crypto_tfm *tfm)
 
        return 0;
 }
-
-void crypto_exit_cipher_ops(struct crypto_tfm *tfm)
-{
-}
index c33f0763a956a2a99302963cdeebd67e64fe8c4d..f2d522924a070f11b5d2c09ee62831c105e9a09e 100644 (file)
@@ -42,7 +42,3 @@ int crypto_init_compress_ops(struct crypto_tfm *tfm)
 
        return 0;
 }
-
-void crypto_exit_compress_ops(struct crypto_tfm *tfm)
-{
-}
index 7eefcdb00227740e39a22d61515d016b4f36caa0..f07320423191ac3171d29f2a7fb7aa9a13b74ce7 100644 (file)
@@ -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_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);
 void crypto_larval_kill(struct crypto_alg *alg);
 struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask);