History

crypto: skcipher - remove crypto_has_ablkcipher()

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.

Eric Biggers committed 7 years ago

Commit cec0cb81 parent d3ca75a2 files · +1 −32Browse files

Unified · Split

2 files
  1. Documentation/crypto/api-skcipher.rst +1 −1
  2. include/linux/crypto.h +0 −31
Documentation/crypto/api-skcipher.rst+1−1
@@ -41,7 +41,7 @@ Asynchronous Block Cipher API - Deprecated · 40 unmodified lines
41 :doc: Asynchronous Block Cipher API41 :doc: Asynchronous Block Cipher API
42 42
43.. kernel-doc:: include/linux/crypto.h43.. 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_decrypt44 :functions: crypto_free_ablkcipher crypto_ablkcipher_ivsize crypto_ablkcipher_blocksize crypto_ablkcipher_setkey crypto_ablkcipher_reqtfm crypto_ablkcipher_encrypt crypto_ablkcipher_decrypt
45 45
46Asynchronous Cipher Request Handle - Deprecated46Asynchronous Cipher Request Handle - Deprecated
47-----------------------------------------------47-----------------------------------------------
include/linux/crypto.h+0−31
@@ -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
903static 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
910static 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 API904 * 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 */
972static 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
979static inline struct ablkcipher_tfm *crypto_ablkcipher_crt(948static inline struct ablkcipher_tfm *crypto_ablkcipher_crt(
980 struct crypto_ablkcipher *tfm)949 struct crypto_ablkcipher *tfm)
981{950{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t