aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/hash.h3
-rw-r--r--include/crypto/internal/hash.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index f74214a4b01b..fcc02d978231 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -48,6 +48,7 @@ struct crypto_ahash {
48}; 48};
49 49
50struct crypto_shash { 50struct crypto_shash {
51 unsigned int descsize;
51 struct crypto_tfm base; 52 struct crypto_tfm base;
52}; 53};
53 54
@@ -275,7 +276,7 @@ static inline void crypto_shash_clear_flags(struct crypto_shash *tfm, u32 flags)
275 276
276static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm) 277static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm)
277{ 278{
278 return crypto_shash_alg(tfm)->descsize; 279 return tfm->descsize;
279} 280}
280 281
281static inline void *shash_desc_ctx(struct shash_desc *desc) 282static inline void *shash_desc_ctx(struct shash_desc *desc)
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h
index 069b93e1a8ec..2d1b10f23c91 100644
--- a/include/crypto/internal/hash.h
+++ b/include/crypto/internal/hash.h
@@ -135,7 +135,7 @@ static inline void *crypto_shash_ctx_aligned(struct crypto_shash *tfm)
135 135
136static inline struct crypto_shash *__crypto_shash_cast(struct crypto_tfm *tfm) 136static inline struct crypto_shash *__crypto_shash_cast(struct crypto_tfm *tfm)
137{ 137{
138 return (struct crypto_shash *)tfm; 138 return container_of(tfm, struct crypto_shash, base);
139} 139}
140 140
141#endif /* _CRYPTO_INTERNAL_HASH_H */ 141#endif /* _CRYPTO_INTERNAL_HASH_H */