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

Configure Feed

Select the types of activity you want to include in your feed.

crypto: api - Remove crypto_init_ops()

Purge crypto_type::init() as well.
The last user seems to be gone with commit d63007eb954e ("crypto:
ablkcipher - remove deprecated and unused ablkcipher support").

Signed-off-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Dmitry Safonov and committed by
Herbert Xu
fa919f9e 6637e11e

-15
-14
crypto/api.c
··· 345 345 } 346 346 EXPORT_SYMBOL_GPL(crypto_alg_mod_lookup); 347 347 348 - static int crypto_init_ops(struct crypto_tfm *tfm, u32 type, u32 mask) 349 - { 350 - const struct crypto_type *type_obj = tfm->__crt_alg->cra_type; 351 - 352 - if (type_obj) 353 - return type_obj->init(tfm, type, mask); 354 - return 0; 355 - } 356 - 357 348 static void crypto_exit_ops(struct crypto_tfm *tfm) 358 349 { 359 350 const struct crypto_type *type = tfm->__crt_alg->cra_type; ··· 401 410 tfm->__crt_alg = alg; 402 411 refcount_set(&tfm->refcnt, 1); 403 412 404 - err = crypto_init_ops(tfm, type, mask); 405 - if (err) 406 - goto out_free_tfm; 407 - 408 413 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) 409 414 goto cra_init_failed; 410 415 ··· 408 421 409 422 cra_init_failed: 410 423 crypto_exit_ops(tfm); 411 - out_free_tfm: 412 424 if (err == -EAGAIN) 413 425 crypto_shoot_alg(alg); 414 426 kfree(tfm);
-1
include/crypto/algapi.h
··· 56 56 struct crypto_type { 57 57 unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask); 58 58 unsigned int (*extsize)(struct crypto_alg *alg); 59 - int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask); 60 59 int (*init_tfm)(struct crypto_tfm *tfm); 61 60 void (*show)(struct seq_file *m, struct crypto_alg *alg); 62 61 int (*report)(struct sk_buff *skb, struct crypto_alg *alg);