crypto: skcipher - Get rid of crypto_spawn_skcipher2()
authorEric Biggers <ebiggers@google.com>
Fri, 28 Oct 2016 16:52:19 +0000 (09:52 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 1 Nov 2016 00:37:17 +0000 (08:37 +0800)
Since commit 3a01d0ee2b99 ("crypto: skcipher - Remove top-level
givcipher interface"), crypto_spawn_skcipher2() and
crypto_spawn_skcipher() are equivalent.  So switch callers of
crypto_spawn_skcipher2() to crypto_spawn_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 03d5edc9c16ed9bb0093b33839283b3895886f4a..875470b0e026fb5b61a9e6dfea4dc6e7d9ff06a3 100644 (file)
@@ -324,7 +324,7 @@ static int crypto_authenc_init_tfm(struct crypto_aead *tfm)
        if (IS_ERR(auth))
                return PTR_ERR(auth);
 
-       enc = crypto_spawn_skcipher2(&ictx->enc);
+       enc = crypto_spawn_skcipher(&ictx->enc);
        err = PTR_ERR(enc);
        if (IS_ERR(enc))
                goto err_free_ahash;
index bad6ef46421b075fa3c33f12230e870f65b78747..6f8f6b86bfe29e0cf0c8fbf2cbe6ab26b705bc9a 100644 (file)
@@ -342,7 +342,7 @@ static int crypto_authenc_esn_init_tfm(struct crypto_aead *tfm)
        if (IS_ERR(auth))
                return PTR_ERR(auth);
 
-       enc = crypto_spawn_skcipher2(&ictx->enc);
+       enc = crypto_spawn_skcipher(&ictx->enc);
        err = PTR_ERR(enc);
        if (IS_ERR(enc))
                goto err_free_ahash;
index 67e3636f7549ffe7c5719a6d14e3af1c7bb5a8aa..26b924d1e5826d5779e28905e8f7ac2622df2749 100644 (file)
@@ -462,7 +462,7 @@ static int crypto_ccm_init_tfm(struct crypto_aead *tfm)
        if (IS_ERR(cipher))
                return PTR_ERR(cipher);
 
-       ctr = crypto_spawn_skcipher2(&ictx->ctr);
+       ctr = crypto_spawn_skcipher(&ictx->ctr);
        err = PTR_ERR(ctr);
        if (IS_ERR(ctr))
                goto err_free_cipher;
index 66291d4ddaab3b33335dc99008f82db7e71a3cad..db1bc3147bc4708b5a4e16c36844e5452101bf64 100644 (file)
@@ -532,7 +532,7 @@ static int chachapoly_init(struct crypto_aead *tfm)
        if (IS_ERR(poly))
                return PTR_ERR(poly);
 
-       chacha = crypto_spawn_skcipher2(&ictx->chacha);
+       chacha = crypto_spawn_skcipher(&ictx->chacha);
        if (IS_ERR(chacha)) {
                crypto_free_ahash(poly);
                return PTR_ERR(chacha);
index 57114b131db6f7f1c7d06141faead0021596eb2b..a9a7a44f27834137974ec3ab0016765c2735f37d 100644 (file)
@@ -312,7 +312,7 @@ static int crypto_rfc3686_init_tfm(struct crypto_skcipher *tfm)
        unsigned long align;
        unsigned int reqsize;
 
-       cipher = crypto_spawn_skcipher2(spawn);
+       cipher = crypto_spawn_skcipher(spawn);
        if (IS_ERR(cipher))
                return PTR_ERR(cipher);
 
index 8883b622d454e4e0d6ca79bdd68f81555567ea70..00254d76b21b64fa21baf4e61972fc83f7ad3e70 100644 (file)
@@ -290,7 +290,7 @@ static int crypto_cts_init_tfm(struct crypto_skcipher *tfm)
        unsigned bsize;
        unsigned align;
 
-       cipher = crypto_spawn_skcipher2(spawn);
+       cipher = crypto_spawn_skcipher(spawn);
        if (IS_ERR(cipher))
                return PTR_ERR(cipher);
 
index 5f11b80a9b8a9d7549cc6b513031fa0ebb788c94..b7ad808be3d4ec6c3822ce2cc5c0428d8f3b3dd0 100644 (file)
@@ -575,7 +575,7 @@ static int crypto_gcm_init_tfm(struct crypto_aead *tfm)
        if (IS_ERR(ghash))
                return PTR_ERR(ghash);
 
-       ctr = crypto_spawn_skcipher2(&ictx->ctr);
+       ctr = crypto_spawn_skcipher(&ictx->ctr);
        err = PTR_ERR(ctr);
        if (IS_ERR(ctr))
                goto err_free_hash;
index 558f5c9a8bd96a9712ae005cd2accf42f0702edc..7a7e815a17018c486d61942b735d7b47f90b3f17 100644 (file)
@@ -91,12 +91,6 @@ static inline struct crypto_skcipher *crypto_spawn_skcipher(
        return crypto_spawn_tfm2(&spawn->base);
 }
 
-static inline struct crypto_skcipher *crypto_spawn_skcipher2(
-       struct crypto_skcipher_spawn *spawn)
-{
-       return crypto_spawn_skcipher(spawn);
-}
-
 static inline void crypto_skcipher_set_reqsize(
        struct crypto_skcipher *skcipher, unsigned int reqsize)
 {