crypto: skcipher - Get rid of crypto_grab_skcipher2()
PATCH 1/1 crypto: skcipher - Get rid of crypto_grab_skcipher2()
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 <[email protected]>
--- crypto/authenc.c | 6 +++--- crypto/authencesn.c | 6 +++--- crypto/ccm.c | 6 +++--- crypto/chacha20poly1305.c | 6 +++--- crypto/ctr.c | 6 +++--- crypto/cts.c | 6 +++--- crypto/gcm.c | 6 +++--- include/crypto/internal/skcipher.h | 6 ------ 8 files changed, 21 insertions(+), 27 deletions(-)
crypto/authenc.c +3 -3
@@ -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;
crypto/authencesn.c +3 -3
@@ -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;
crypto/ccm.c +3 -3
@@ -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;
crypto/chacha20poly1305.c +3 -3
@@ -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;
crypto/ctr.c +3 -3
@@ -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;
crypto/cts.c +3 -3
@@ -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;
crypto/gcm.c +3 -3
@@ -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;
include/crypto/internal/skcipher.h +0 -6
@@ -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);
Signature · 1 line
2.8.0.rc3.226.g39d4020
Herbert Xu
maintainerQuoted 6 lines · Eric Biggers
Since commit
3a01d0ee2b99("crypto: skcipher - Remove top-level givcipher interface"),crypto_grab_skcipher2()andcrypto_grab_skcipher()are equivalent. So switch callers ofcrypto_grab_skcipher2()tocrypto_grab_skcipher()and remove it.Signed-off-by Eric Biggers <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt