crypto_has_ablkcipher() has no users, and it does the same thing as crypto_has_skcipher() anyway. So remove it. This also removes the last user of crypto_skcipher_type() and crypto_skcipher_mask(), so remove those too.
Unified · Split
| @@ -41,7 +41,7 @@ Asynchronous Block Cipher API - Deprecated · 40 unmodified lines | |||
| 41 | :doc: Asynchronous Block Cipher API | 41 | :doc: Asynchronous Block Cipher API |
| 42 | 42 | ||
| 43 | .. kernel-doc:: include/linux/crypto.h | 43 | .. kernel-doc:: include/linux/crypto.h |
| 44 | :functions: crypto_free_ablkcipher crypto_has_ablkcipher crypto_ablkcipher_ivsize crypto_ablkcipher_blocksize crypto_ablkcipher_setkey crypto_ablkcipher_reqtfm crypto_ablkcipher_encrypt crypto_ablkcipher_decrypt | 44 | :functions: crypto_free_ablkcipher crypto_ablkcipher_ivsize crypto_ablkcipher_blocksize crypto_ablkcipher_setkey crypto_ablkcipher_reqtfm crypto_ablkcipher_encrypt crypto_ablkcipher_decrypt |
| 45 | 45 | ||
| 46 | Asynchronous Cipher Request Handle - Deprecated | 46 | Asynchronous Cipher Request Handle - Deprecated |
| 47 | ----------------------------------------------- | 47 | ----------------------------------------------- |
| @@ -900,20 +900,6 @@ static inline struct crypto_ablkcipher *__crypto_ablkcipher_cast( · 899 unmodified lines | |||
| 900 | return (struct crypto_ablkcipher *)tfm; | 900 | return (struct crypto_ablkcipher *)tfm; |
| 901 | } | 901 | } |
| 902 | 902 | ||
| 903 | static inline u32 crypto_skcipher_type(u32 type) | ||
| 904 | { | ||
| 905 | type &= ~CRYPTO_ALG_TYPE_MASK; | ||
| 906 | type |= CRYPTO_ALG_TYPE_BLKCIPHER; | ||
| 907 | return type; | ||
| 908 | } | ||
| 909 | |||
| 910 | static inline u32 crypto_skcipher_mask(u32 mask) | ||
| 911 | { | ||
| 912 | mask &= ~CRYPTO_ALG_TYPE_MASK; | ||
| 913 | mask |= CRYPTO_ALG_TYPE_BLKCIPHER_MASK; | ||
| 914 | return mask; | ||
| 915 | } | ||
| 916 | |||
| 917 | /** | 903 | /** |
| 918 | * DOC: Asynchronous Block Cipher API | 904 | * DOC: Asynchronous Block Cipher API |
| 919 | * | 905 | * |
| @@ -959,23 +945,6 @@ static inline void crypto_free_ablkcipher(struct crypto_ablkcipher *tfm) · 39 unmodified lines | |||
| 959 | crypto_free_tfm(crypto_ablkcipher_tfm(tfm)); | 945 | crypto_free_tfm(crypto_ablkcipher_tfm(tfm)); |
| 960 | } | 946 | } |
| 961 | 947 | ||
| 962 | /** | ||
| 963 | * crypto_has_ablkcipher() - Search for the availability of an ablkcipher. | ||
| 964 | * @alg_name: is the cra_name / name or cra_driver_name / driver name of the | ||
| 965 | * ablkcipher | ||
| 966 | * @type: specifies the type of the cipher | ||
| 967 | * @mask: specifies the mask for the cipher | ||
| 968 | * | ||
| 969 | * Return: true when the ablkcipher is known to the kernel crypto API; false | ||
| 970 | * otherwise | ||
| 971 | */ | ||
| 972 | static inline int crypto_has_ablkcipher(const char *alg_name, u32 type, | ||
| 973 | u32 mask) | ||
| 974 | { | ||
| 975 | return crypto_has_alg(alg_name, crypto_skcipher_type(type), | ||
| 976 | crypto_skcipher_mask(mask)); | ||
| 977 | } | ||
| 978 | |||
| 979 | static inline struct ablkcipher_tfm *crypto_ablkcipher_crt( | 948 | static inline struct ablkcipher_tfm *crypto_ablkcipher_crt( |
| 980 | struct crypto_ablkcipher *tfm) | 949 | struct crypto_ablkcipher *tfm) |
| 981 | { | 950 | { |