Loading crypto/shash.c +1 −17 Original line number Diff line number Diff line Loading @@ -153,9 +153,6 @@ static int crypto_shash_init_tfm(struct crypto_tfm *tfm) { struct crypto_shash *hash = __crypto_shash_cast(tfm); struct shash_alg *alg = crypto_shash_alg(hash); int err; hash->descsize = alg->descsize; shash_set_needkey(hash, alg); Loading @@ -165,18 +162,7 @@ static int crypto_shash_init_tfm(struct crypto_tfm *tfm) if (!alg->init_tfm) return 0; err = alg->init_tfm(hash); if (err) return err; /* ->init_tfm() may have increased the descsize. */ if (WARN_ON_ONCE(hash->descsize > HASH_MAX_DESCSIZE)) { if (alg->exit_tfm) alg->exit_tfm(hash); return -EINVAL; } return 0; return alg->init_tfm(hash); } static void crypto_shash_free_instance(struct crypto_instance *inst) Loading Loading @@ -274,8 +260,6 @@ struct crypto_shash *crypto_clone_shash(struct crypto_shash *hash) if (IS_ERR(nhash)) return nhash; nhash->descsize = hash->descsize; if (alg->clone_tfm) { err = alg->clone_tfm(nhash, hash); if (err) { Loading include/crypto/hash.h +1 −2 Original line number Diff line number Diff line Loading @@ -235,7 +235,6 @@ struct crypto_ahash { }; struct crypto_shash { unsigned int descsize; struct crypto_tfm base; }; Loading Loading @@ -810,7 +809,7 @@ static inline void crypto_shash_clear_flags(struct crypto_shash *tfm, u32 flags) */ static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm) { return tfm->descsize; return crypto_shash_alg(tfm)->descsize; } static inline void *shash_desc_ctx(struct shash_desc *desc) Loading Loading
crypto/shash.c +1 −17 Original line number Diff line number Diff line Loading @@ -153,9 +153,6 @@ static int crypto_shash_init_tfm(struct crypto_tfm *tfm) { struct crypto_shash *hash = __crypto_shash_cast(tfm); struct shash_alg *alg = crypto_shash_alg(hash); int err; hash->descsize = alg->descsize; shash_set_needkey(hash, alg); Loading @@ -165,18 +162,7 @@ static int crypto_shash_init_tfm(struct crypto_tfm *tfm) if (!alg->init_tfm) return 0; err = alg->init_tfm(hash); if (err) return err; /* ->init_tfm() may have increased the descsize. */ if (WARN_ON_ONCE(hash->descsize > HASH_MAX_DESCSIZE)) { if (alg->exit_tfm) alg->exit_tfm(hash); return -EINVAL; } return 0; return alg->init_tfm(hash); } static void crypto_shash_free_instance(struct crypto_instance *inst) Loading Loading @@ -274,8 +260,6 @@ struct crypto_shash *crypto_clone_shash(struct crypto_shash *hash) if (IS_ERR(nhash)) return nhash; nhash->descsize = hash->descsize; if (alg->clone_tfm) { err = alg->clone_tfm(nhash, hash); if (err) { Loading
include/crypto/hash.h +1 −2 Original line number Diff line number Diff line Loading @@ -235,7 +235,6 @@ struct crypto_ahash { }; struct crypto_shash { unsigned int descsize; struct crypto_tfm base; }; Loading Loading @@ -810,7 +809,7 @@ static inline void crypto_shash_clear_flags(struct crypto_shash *tfm, u32 flags) */ static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm) { return tfm->descsize; return crypto_shash_alg(tfm)->descsize; } static inline void *shash_desc_ctx(struct shash_desc *desc) Loading