Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: null - Get rid of crypto_{get,put}_default_null_skcipher2()

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>

authored by

Eric Biggers and committed by
Herbert Xu
3a2d4fb5 cadc9ab5

+11 -21
+3 -3
crypto/aead.c
··· 295 295 if (err) 296 296 goto out; 297 297 298 - ctx->sknull = crypto_get_default_null_skcipher2(); 298 + ctx->sknull = crypto_get_default_null_skcipher(); 299 299 err = PTR_ERR(ctx->sknull); 300 300 if (IS_ERR(ctx->sknull)) 301 301 goto out; ··· 315 315 return err; 316 316 317 317 drop_null: 318 - crypto_put_default_null_skcipher2(); 318 + crypto_put_default_null_skcipher(); 319 319 goto out; 320 320 } 321 321 EXPORT_SYMBOL_GPL(aead_init_geniv); ··· 325 325 struct aead_geniv_ctx *ctx = crypto_aead_ctx(tfm); 326 326 327 327 crypto_free_aead(ctx->child); 328 - crypto_put_default_null_skcipher2(); 328 + crypto_put_default_null_skcipher(); 329 329 } 330 330 EXPORT_SYMBOL_GPL(aead_exit_geniv); 331 331
+2 -2
crypto/algif_aead.c
··· 469 469 return ERR_CAST(aead); 470 470 } 471 471 472 - null_tfm = crypto_get_default_null_skcipher2(); 472 + null_tfm = crypto_get_default_null_skcipher(); 473 473 if (IS_ERR(null_tfm)) { 474 474 crypto_free_aead(aead); 475 475 kfree(tfm); ··· 487 487 struct aead_tfm *tfm = private; 488 488 489 489 crypto_free_aead(tfm->aead); 490 - crypto_put_default_null_skcipher2(); 490 + crypto_put_default_null_skcipher(); 491 491 kfree(tfm); 492 492 } 493 493
+2 -2
crypto/authenc.c
··· 329 329 if (IS_ERR(enc)) 330 330 goto err_free_ahash; 331 331 332 - null = crypto_get_default_null_skcipher2(); 332 + null = crypto_get_default_null_skcipher(); 333 333 err = PTR_ERR(null); 334 334 if (IS_ERR(null)) 335 335 goto err_free_skcipher; ··· 363 363 364 364 crypto_free_ahash(ctx->auth); 365 365 crypto_free_skcipher(ctx->enc); 366 - crypto_put_default_null_skcipher2(); 366 + crypto_put_default_null_skcipher(); 367 367 } 368 368 369 369 static void crypto_authenc_free(struct aead_instance *inst)
+2 -2
crypto/authencesn.c
··· 352 352 if (IS_ERR(enc)) 353 353 goto err_free_ahash; 354 354 355 - null = crypto_get_default_null_skcipher2(); 355 + null = crypto_get_default_null_skcipher(); 356 356 err = PTR_ERR(null); 357 357 if (IS_ERR(null)) 358 358 goto err_free_skcipher; ··· 389 389 390 390 crypto_free_ahash(ctx->auth); 391 391 crypto_free_skcipher(ctx->enc); 392 - crypto_put_default_null_skcipher2(); 392 + crypto_put_default_null_skcipher(); 393 393 } 394 394 395 395 static void crypto_authenc_esn_free(struct aead_instance *inst)
+2 -2
crypto/gcm.c
··· 1101 1101 if (IS_ERR(aead)) 1102 1102 return PTR_ERR(aead); 1103 1103 1104 - null = crypto_get_default_null_skcipher2(); 1104 + null = crypto_get_default_null_skcipher(); 1105 1105 err = PTR_ERR(null); 1106 1106 if (IS_ERR(null)) 1107 1107 goto err_free_aead; ··· 1129 1129 struct crypto_rfc4543_ctx *ctx = crypto_aead_ctx(tfm); 1130 1130 1131 1131 crypto_free_aead(ctx->child); 1132 - crypto_put_default_null_skcipher2(); 1132 + crypto_put_default_null_skcipher(); 1133 1133 } 1134 1134 1135 1135 static void crypto_rfc4543_free(struct aead_instance *inst)
-10
include/crypto/null.h
··· 12 12 struct crypto_skcipher *crypto_get_default_null_skcipher(void); 13 13 void crypto_put_default_null_skcipher(void); 14 14 15 - static inline struct crypto_skcipher *crypto_get_default_null_skcipher2(void) 16 - { 17 - return crypto_get_default_null_skcipher(); 18 - } 19 - 20 - static inline void crypto_put_default_null_skcipher2(void) 21 - { 22 - crypto_put_default_null_skcipher(); 23 - } 24 - 25 15 #endif