Commit cc44215eaaa5e4032946b962353526ae6c370c0e
Committed by
David S. Miller
1 parent
ab7827059a
Exists in
master
and in
4 other branches
[CRYPTO] api: Remove unused functions
This patch removes the following no longer used functions: - api.c: crypto_alg_available() - digest.c: crypto_digest_init() - digest.c: crypto_digest_update() - digest.c: crypto_digest_final() - digest.c: crypto_digest_digest() Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Showing 3 changed files with 0 additions and 85 deletions Side-by-side Diff
crypto/api.c
... | ... | @@ -466,23 +466,8 @@ |
466 | 466 | kfree(tfm); |
467 | 467 | } |
468 | 468 | |
469 | -int crypto_alg_available(const char *name, u32 flags) | |
470 | -{ | |
471 | - int ret = 0; | |
472 | - struct crypto_alg *alg = crypto_alg_mod_lookup(name, 0, | |
473 | - CRYPTO_ALG_ASYNC); | |
474 | - | |
475 | - if (!IS_ERR(alg)) { | |
476 | - crypto_mod_put(alg); | |
477 | - ret = 1; | |
478 | - } | |
479 | - | |
480 | - return ret; | |
481 | -} | |
482 | - | |
483 | 469 | EXPORT_SYMBOL_GPL(crypto_alloc_tfm); |
484 | 470 | EXPORT_SYMBOL_GPL(crypto_free_tfm); |
485 | -EXPORT_SYMBOL_GPL(crypto_alg_available); | |
486 | 471 | |
487 | 472 | int crypto_has_alg(const char *name, u32 type, u32 mask) |
488 | 473 | { |
crypto/digest.c
... | ... | @@ -21,54 +21,6 @@ |
21 | 21 | #include "internal.h" |
22 | 22 | #include "scatterwalk.h" |
23 | 23 | |
24 | -void crypto_digest_init(struct crypto_tfm *tfm) | |
25 | -{ | |
26 | - struct crypto_hash *hash = crypto_hash_cast(tfm); | |
27 | - struct hash_desc desc = { .tfm = hash, .flags = tfm->crt_flags }; | |
28 | - | |
29 | - crypto_hash_init(&desc); | |
30 | -} | |
31 | -EXPORT_SYMBOL_GPL(crypto_digest_init); | |
32 | - | |
33 | -void crypto_digest_update(struct crypto_tfm *tfm, | |
34 | - struct scatterlist *sg, unsigned int nsg) | |
35 | -{ | |
36 | - struct crypto_hash *hash = crypto_hash_cast(tfm); | |
37 | - struct hash_desc desc = { .tfm = hash, .flags = tfm->crt_flags }; | |
38 | - unsigned int nbytes = 0; | |
39 | - unsigned int i; | |
40 | - | |
41 | - for (i = 0; i < nsg; i++) | |
42 | - nbytes += sg[i].length; | |
43 | - | |
44 | - crypto_hash_update(&desc, sg, nbytes); | |
45 | -} | |
46 | -EXPORT_SYMBOL_GPL(crypto_digest_update); | |
47 | - | |
48 | -void crypto_digest_final(struct crypto_tfm *tfm, u8 *out) | |
49 | -{ | |
50 | - struct crypto_hash *hash = crypto_hash_cast(tfm); | |
51 | - struct hash_desc desc = { .tfm = hash, .flags = tfm->crt_flags }; | |
52 | - | |
53 | - crypto_hash_final(&desc, out); | |
54 | -} | |
55 | -EXPORT_SYMBOL_GPL(crypto_digest_final); | |
56 | - | |
57 | -void crypto_digest_digest(struct crypto_tfm *tfm, | |
58 | - struct scatterlist *sg, unsigned int nsg, u8 *out) | |
59 | -{ | |
60 | - struct crypto_hash *hash = crypto_hash_cast(tfm); | |
61 | - struct hash_desc desc = { .tfm = hash, .flags = tfm->crt_flags }; | |
62 | - unsigned int nbytes = 0; | |
63 | - unsigned int i; | |
64 | - | |
65 | - for (i = 0; i < nsg; i++) | |
66 | - nbytes += sg[i].length; | |
67 | - | |
68 | - crypto_hash_digest(&desc, sg, nbytes, out); | |
69 | -} | |
70 | -EXPORT_SYMBOL_GPL(crypto_digest_digest); | |
71 | - | |
72 | 24 | static int init(struct hash_desc *desc) |
73 | 25 | { |
74 | 26 | struct crypto_tfm *tfm = crypto_hash_tfm(desc->tfm); |
include/linux/crypto.h
... | ... | @@ -241,12 +241,8 @@ |
241 | 241 | * Algorithm query interface. |
242 | 242 | */ |
243 | 243 | #ifdef CONFIG_CRYPTO |
244 | -int crypto_alg_available(const char *name, u32 flags) | |
245 | - __deprecated_for_modules; | |
246 | 244 | int crypto_has_alg(const char *name, u32 type, u32 mask); |
247 | 245 | #else |
248 | -static int crypto_alg_available(const char *name, u32 flags) | |
249 | - __deprecated_for_modules; | |
250 | 246 | static inline int crypto_alg_available(const char *name, u32 flags) |
251 | 247 | { |
252 | 248 | return 0; |
... | ... | @@ -707,16 +703,6 @@ |
707 | 703 | dst, src); |
708 | 704 | } |
709 | 705 | |
710 | -void crypto_digest_init(struct crypto_tfm *tfm) __deprecated_for_modules; | |
711 | -void crypto_digest_update(struct crypto_tfm *tfm, | |
712 | - struct scatterlist *sg, unsigned int nsg) | |
713 | - __deprecated_for_modules; | |
714 | -void crypto_digest_final(struct crypto_tfm *tfm, u8 *out) | |
715 | - __deprecated_for_modules; | |
716 | -void crypto_digest_digest(struct crypto_tfm *tfm, | |
717 | - struct scatterlist *sg, unsigned int nsg, u8 *out) | |
718 | - __deprecated_for_modules; | |
719 | - | |
720 | 706 | static inline struct crypto_hash *__crypto_hash_cast(struct crypto_tfm *tfm) |
721 | 707 | { |
722 | 708 | return (struct crypto_hash *)tfm; |
... | ... | @@ -727,14 +713,6 @@ |
727 | 713 | BUG_ON((crypto_tfm_alg_type(tfm) ^ CRYPTO_ALG_TYPE_HASH) & |
728 | 714 | CRYPTO_ALG_TYPE_HASH_MASK); |
729 | 715 | return __crypto_hash_cast(tfm); |
730 | -} | |
731 | - | |
732 | -static int crypto_digest_setkey(struct crypto_tfm *tfm, const u8 *key, | |
733 | - unsigned int keylen) __deprecated; | |
734 | -static inline int crypto_digest_setkey(struct crypto_tfm *tfm, | |
735 | - const u8 *key, unsigned int keylen) | |
736 | -{ | |
737 | - return tfm->crt_hash.setkey(crypto_hash_cast(tfm), key, keylen); | |
738 | 716 | } |
739 | 717 | |
740 | 718 | static inline struct crypto_hash *crypto_alloc_hash(const char *alg_name, |