aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto/skcipher.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-11-29 10:23:05 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-12-11 16:36:56 +0800
commit15252d942739813c8d0eac4c1ee6d4c4eb6f101e (patch)
tree3290c3c7c182090e671a4bd01464e31a8cdd469f /include/crypto/skcipher.h
parentcrypto: skcipher - remove crypto_skcipher::keysize (diff)
downloadlinux-dev-15252d942739813c8d0eac4c1ee6d4c4eb6f101e.tar.xz
linux-dev-15252d942739813c8d0eac4c1ee6d4c4eb6f101e.zip
crypto: skcipher - remove crypto_skcipher::setkey
Due to the removal of the blkcipher and ablkcipher algorithm types, crypto_skcipher::setkey now always points to skcipher_setkey(). Simplify by removing this function pointer and instead just making skcipher_setkey() be crypto_skcipher_setkey() directly. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--include/crypto/skcipher.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h
index d8c28c8186a4..ea94cc422b94 100644
--- a/include/crypto/skcipher.h
+++ b/include/crypto/skcipher.h
@@ -35,8 +35,6 @@ struct skcipher_request {
};
struct crypto_skcipher {
- int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
- unsigned int keylen);
int (*encrypt)(struct skcipher_request *req);
int (*decrypt)(struct skcipher_request *req);
@@ -364,11 +362,8 @@ static inline void crypto_sync_skcipher_clear_flags(
*
* Return: 0 if the setting of the key was successful; < 0 if an error occurred
*/
-static inline int crypto_skcipher_setkey(struct crypto_skcipher *tfm,
- const u8 *key, unsigned int keylen)
-{
- return tfm->setkey(tfm, key, keylen);
-}
+int crypto_skcipher_setkey(struct crypto_skcipher *tfm,
+ const u8 *key, unsigned int keylen);
static inline int crypto_sync_skcipher_setkey(struct crypto_sync_skcipher *tfm,
const u8 *key, unsigned int keylen)