crypto: null - Get rid of crypto_{get,put}_default_null_skcipher2()
authorEric Biggers <ebiggers@google.com>
Thu, 7 Dec 2017 18:56:34 +0000 (10:56 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 Dec 2017 08:29:08 +0000 (19:29 +1100)
Since commit 499a66e6b689 ("crypto: null - Remove default null
blkcipher"), crypto_get_default_null_skcipher2() and
crypto_put_default_null_skcipher2() are the same as their non-2
equivalents.  So switch callers of the "2" versions over to the original
versions and remove the "2" versions.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/aead.c
crypto/algif_aead.c
crypto/authenc.c
crypto/authencesn.c
crypto/gcm.c
include/crypto/null.h

index f794b30a9407d651011b6346d99cb8b2fc68b830..fe00cbd7243d028f05701993cf1b82bf23af25c4 100644 (file)
@@ -295,7 +295,7 @@ int aead_init_geniv(struct crypto_aead *aead)
        if (err)
                goto out;
 
-       ctx->sknull = crypto_get_default_null_skcipher2();
+       ctx->sknull = crypto_get_default_null_skcipher();
        err = PTR_ERR(ctx->sknull);
        if (IS_ERR(ctx->sknull))
                goto out;
@@ -315,7 +315,7 @@ out:
        return err;
 
 drop_null:
-       crypto_put_default_null_skcipher2();
+       crypto_put_default_null_skcipher();
        goto out;
 }
 EXPORT_SYMBOL_GPL(aead_init_geniv);
@@ -325,7 +325,7 @@ void aead_exit_geniv(struct crypto_aead *tfm)
        struct aead_geniv_ctx *ctx = crypto_aead_ctx(tfm);
 
        crypto_free_aead(ctx->child);
-       crypto_put_default_null_skcipher2();
+       crypto_put_default_null_skcipher();
 }
 EXPORT_SYMBOL_GPL(aead_exit_geniv);
 
index 9d73be28cf01232c0289b9333af9761cedef908e..87a27eb19680d0f44cca25e67df0ab7c97d36e70 100644 (file)
@@ -469,7 +469,7 @@ static void *aead_bind(const char *name, u32 type, u32 mask)
                return ERR_CAST(aead);
        }
 
-       null_tfm = crypto_get_default_null_skcipher2();
+       null_tfm = crypto_get_default_null_skcipher();
        if (IS_ERR(null_tfm)) {
                crypto_free_aead(aead);
                kfree(tfm);
@@ -487,7 +487,7 @@ static void aead_release(void *private)
        struct aead_tfm *tfm = private;
 
        crypto_free_aead(tfm->aead);
-       crypto_put_default_null_skcipher2();
+       crypto_put_default_null_skcipher();
        kfree(tfm);
 }
 
index 875470b0e026fb5b61a9e6dfea4dc6e7d9ff06a3..d3d6d72fe649ff00e87bf3a2eb0db591da11081e 100644 (file)
@@ -329,7 +329,7 @@ static int crypto_authenc_init_tfm(struct crypto_aead *tfm)
        if (IS_ERR(enc))
                goto err_free_ahash;
 
-       null = crypto_get_default_null_skcipher2();
+       null = crypto_get_default_null_skcipher();
        err = PTR_ERR(null);
        if (IS_ERR(null))
                goto err_free_skcipher;
@@ -363,7 +363,7 @@ static void crypto_authenc_exit_tfm(struct crypto_aead *tfm)
 
        crypto_free_ahash(ctx->auth);
        crypto_free_skcipher(ctx->enc);
-       crypto_put_default_null_skcipher2();
+       crypto_put_default_null_skcipher();
 }
 
 static void crypto_authenc_free(struct aead_instance *inst)
index 0cf5fefdb859b1158460faa278017a524f54a93a..15f91ddd7f0e4e55cfba21b3da4505532e85cac3 100644 (file)
@@ -352,7 +352,7 @@ static int crypto_authenc_esn_init_tfm(struct crypto_aead *tfm)
        if (IS_ERR(enc))
                goto err_free_ahash;
 
-       null = crypto_get_default_null_skcipher2();
+       null = crypto_get_default_null_skcipher();
        err = PTR_ERR(null);
        if (IS_ERR(null))
                goto err_free_skcipher;
@@ -389,7 +389,7 @@ static void crypto_authenc_esn_exit_tfm(struct crypto_aead *tfm)
 
        crypto_free_ahash(ctx->auth);
        crypto_free_skcipher(ctx->enc);
-       crypto_put_default_null_skcipher2();
+       crypto_put_default_null_skcipher();
 }
 
 static void crypto_authenc_esn_free(struct aead_instance *inst)
index 8589681fb9f6d3b522894af6d9bc048a17d93cd2..0ad879e1f9b2124bffa97e47869dc762ae37d58d 100644 (file)
@@ -1101,7 +1101,7 @@ static int crypto_rfc4543_init_tfm(struct crypto_aead *tfm)
        if (IS_ERR(aead))
                return PTR_ERR(aead);
 
-       null = crypto_get_default_null_skcipher2();
+       null = crypto_get_default_null_skcipher();
        err = PTR_ERR(null);
        if (IS_ERR(null))
                goto err_free_aead;
@@ -1129,7 +1129,7 @@ static void crypto_rfc4543_exit_tfm(struct crypto_aead *tfm)
        struct crypto_rfc4543_ctx *ctx = crypto_aead_ctx(tfm);
 
        crypto_free_aead(ctx->child);
-       crypto_put_default_null_skcipher2();
+       crypto_put_default_null_skcipher();
 }
 
 static void crypto_rfc4543_free(struct aead_instance *inst)
index 5757c0a4b3219e64c87026b4f3a5055529d6364d..15aeef6e30ef957662f5be26267b69724b501080 100644 (file)
 struct crypto_skcipher *crypto_get_default_null_skcipher(void);
 void crypto_put_default_null_skcipher(void);
 
-static inline struct crypto_skcipher *crypto_get_default_null_skcipher2(void)
-{
-       return crypto_get_default_null_skcipher();
-}
-
-static inline void crypto_put_default_null_skcipher2(void)
-{
-       crypto_put_default_null_skcipher();
-}
-
 #endif