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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -900,20 +900,6 @@ static inline struct crypto_ablkcipher *__crypto_ablkcipher_cast( · 899 unmodified lines | ||
| 900 | 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 | 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 | 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 | 948 | static inline struct ablkcipher_tfm *crypto_ablkcipher_crt( |
| 980 | 949 | struct crypto_ablkcipher *tfm) |
| 981 | 950 | { |