Skip to content

Commit

Permalink
crypto: skcipher - Get rid of crypto_spawn_skcipher2()
Browse files Browse the repository at this point in the history
Since commit 3a01d0e ("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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
ebiggers authored and herbertx committed Nov 1, 2016
1 parent a35528e commit 60425a8
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crypto/authenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crypto/authencesn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crypto/ccm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crypto/chacha20poly1305.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion crypto/ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion crypto/cts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion crypto/gcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions include/crypto/internal/skcipher.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 60425a8

Please sign in to comment.