crypto: skcipher - Get rid of crypto_grab_skcipher2()
authorEric Biggers <ebiggers@google.com>
Fri, 28 Oct 2016 16:51:13 +0000 (09:51 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 1 Nov 2016 00:37:16 +0000 (08:37 +0800)
Since commit 3a01d0ee2b99 ("crypto: skcipher - Remove top-level
givcipher interface"), crypto_grab_skcipher2() and
crypto_grab_skcipher() are equivalent.  So switch callers of
crypto_grab_skcipher2() to crypto_grab_skcipher() and remove it.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/authenc.c
crypto/authencesn.c
crypto/ccm.c
crypto/chacha20poly1305.c
crypto/ctr.c
crypto/cts.c
crypto/gcm.c
include/crypto/internal/skcipher.h

index a7e1ac786c5db5547e3f011ddccc027a51edc967..03d5edc9c16ed9bb0093b33839283b3895886f4a 100644 (file)
@@ -420,9 +420,9 @@ static int crypto_authenc_create(struct crypto_template *tmpl,
                goto err_free_inst;
 
        crypto_set_skcipher_spawn(&ctx->enc, aead_crypto_instance(inst));
-       err = crypto_grab_skcipher2(&ctx->enc, enc_name, 0,
-                                   crypto_requires_sync(algt->type,
-                                                        algt->mask));
+       err = crypto_grab_skcipher(&ctx->enc, enc_name, 0,
+                                  crypto_requires_sync(algt->type,
+                                                       algt->mask));
        if (err)
                goto err_drop_auth;
 
index 121010ac99629c679c419ac1478b448fae253f1e..bad6ef46421b075fa3c33f12230e870f65b78747 100644 (file)
@@ -441,9 +441,9 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl,
                goto err_free_inst;
 
        crypto_set_skcipher_spawn(&ctx->enc, aead_crypto_instance(inst));
-       err = crypto_grab_skcipher2(&ctx->enc, enc_name, 0,
-                                   crypto_requires_sync(algt->type,
-                                                        algt->mask));
+       err = crypto_grab_skcipher(&ctx->enc, enc_name, 0,
+                                  crypto_requires_sync(algt->type,
+                                                       algt->mask));
        if (err)
                goto err_drop_auth;
 
index 006d8575ef5c71b5ca5f43f35c93a636ce74c618..67e3636f7549ffe7c5719a6d14e3af1c7bb5a8aa 100644 (file)
@@ -544,9 +544,9 @@ static int crypto_ccm_create_common(struct crypto_template *tmpl,
                goto err_free_inst;
 
        crypto_set_skcipher_spawn(&ictx->ctr, aead_crypto_instance(inst));
-       err = crypto_grab_skcipher2(&ictx->ctr, ctr_name, 0,
-                                   crypto_requires_sync(algt->type,
-                                                        algt->mask));
+       err = crypto_grab_skcipher(&ictx->ctr, ctr_name, 0,
+                                  crypto_requires_sync(algt->type,
+                                                       algt->mask));
        if (err)
                goto err_drop_cipher;
 
index e899ef51dc8eda2dec93f98a1260977f04e9d4b2..66291d4ddaab3b33335dc99008f82db7e71a3cad 100644 (file)
@@ -625,9 +625,9 @@ static int chachapoly_create(struct crypto_template *tmpl, struct rtattr **tb,
                goto err_free_inst;
 
        crypto_set_skcipher_spawn(&ctx->chacha, aead_crypto_instance(inst));
-       err = crypto_grab_skcipher2(&ctx->chacha, chacha_name, 0,
-                                   crypto_requires_sync(algt->type,
-                                                        algt->mask));
+       err = crypto_grab_skcipher(&ctx->chacha, chacha_name, 0,
+                                  crypto_requires_sync(algt->type,
+                                                       algt->mask));
        if (err)
                goto err_drop_poly;
 
index ff4d21eddb83c87c4ff5e52049989e2b084b030d..57114b131db6f7f1c7d06141faead0021596eb2b 100644 (file)
@@ -370,9 +370,9 @@ static int crypto_rfc3686_create(struct crypto_template *tmpl,
        spawn = skcipher_instance_ctx(inst);
 
        crypto_set_skcipher_spawn(spawn, skcipher_crypto_instance(inst));
-       err = crypto_grab_skcipher2(spawn, cipher_name, 0,
-                                   crypto_requires_sync(algt->type,
-                                                        algt->mask));
+       err = crypto_grab_skcipher(spawn, cipher_name, 0,
+                                  crypto_requires_sync(algt->type,
+                                                       algt->mask));
        if (err)
                goto err_free_inst;
 
index 51976187b2bf81516f2c64b388387484714037d2..8883b622d454e4e0d6ca79bdd68f81555567ea70 100644 (file)
@@ -348,9 +348,9 @@ static int crypto_cts_create(struct crypto_template *tmpl, struct rtattr **tb)
        spawn = skcipher_instance_ctx(inst);
 
        crypto_set_skcipher_spawn(spawn, skcipher_crypto_instance(inst));
-       err = crypto_grab_skcipher2(spawn, cipher_name, 0,
-                                   crypto_requires_sync(algt->type,
-                                                        algt->mask));
+       err = crypto_grab_skcipher(spawn, cipher_name, 0,
+                                  crypto_requires_sync(algt->type,
+                                                       algt->mask));
        if (err)
                goto err_free_inst;
 
index 39c261d819af1c746fb7d2e162e61c329d15e7ef..5f11b80a9b8a9d7549cc6b513031fa0ebb788c94 100644 (file)
@@ -663,9 +663,9 @@ static int crypto_gcm_create_common(struct crypto_template *tmpl,
                goto err_drop_ghash;
 
        crypto_set_skcipher_spawn(&ctx->ctr, aead_crypto_instance(inst));
-       err = crypto_grab_skcipher2(&ctx->ctr, ctr_name, 0,
-                                   crypto_requires_sync(algt->type,
-                                                        algt->mask));
+       err = crypto_grab_skcipher(&ctx->ctr, ctr_name, 0,
+                                  crypto_requires_sync(algt->type,
+                                                       algt->mask));
        if (err)
                goto err_drop_ghash;
 
index 95d2a1822796a278e01ee1dcdc3f7352f5e05ed5..558f5c9a8bd96a9712ae005cd2accf42f0702edc 100644 (file)
@@ -68,12 +68,6 @@ static inline void crypto_set_skcipher_spawn(
 int crypto_grab_skcipher(struct crypto_skcipher_spawn *spawn, const char *name,
                         u32 type, u32 mask);
 
-static inline int crypto_grab_skcipher2(struct crypto_skcipher_spawn *spawn,
-                                       const char *name, u32 type, u32 mask)
-{
-       return crypto_grab_skcipher(spawn, name, type, mask);
-}
-
 static inline void crypto_drop_skcipher(struct crypto_skcipher_spawn *spawn)
 {
        crypto_drop_spawn(&spawn->base);