Skip to content

Commit acd7799

Browse files
ebiggersherbertx
authored andcommitted
crypto: shash - remove crypto_shash_ctx_aligned()
crypto_shash_ctx_aligned() is no longer used, and it is useless now that shash algorithms don't support nonzero alignmasks, so remove it. Also remove crypto_tfm_ctx_aligned() which was only called by crypto_shash_ctx_aligned(). It's unlikely to be useful again, since it seems inappropriate to use cra_alignmask to represent alignment for the tfm context when it already means alignment for inputs/outputs. Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 201c0da commit acd7799

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

include/crypto/algapi.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,6 @@ static inline void *crypto_tfm_ctx_align(struct crypto_tfm *tfm,
195195
return PTR_ALIGN(crypto_tfm_ctx(tfm), align);
196196
}
197197

198-
static inline void *crypto_tfm_ctx_aligned(struct crypto_tfm *tfm)
199-
{
200-
return crypto_tfm_ctx_align(tfm, crypto_tfm_alg_alignmask(tfm) + 1);
201-
}
202-
203198
static inline unsigned int crypto_dma_align(void)
204199
{
205200
return CRYPTO_DMA_ALIGN;

include/crypto/internal/hash.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,6 @@ static inline struct crypto_shash *crypto_spawn_shash(
269269
return crypto_spawn_tfm2(&spawn->base);
270270
}
271271

272-
static inline void *crypto_shash_ctx_aligned(struct crypto_shash *tfm)
273-
{
274-
return crypto_tfm_ctx_aligned(&tfm->base);
275-
}
276-
277272
static inline struct crypto_shash *__crypto_shash_cast(struct crypto_tfm *tfm)
278273
{
279274
return container_of(tfm, struct crypto_shash, base);

0 commit comments

Comments
 (0)