Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: ahash - Use cra_reqsize

Use the common reqsize field and remove reqsize from ahash_alg.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+2 -5
+2 -2
crypto/ahash.c
··· 723 723 struct ahash_alg *alg = crypto_ahash_alg(hash); 724 724 725 725 crypto_ahash_set_statesize(hash, alg->halg.statesize); 726 - crypto_ahash_set_reqsize(hash, alg->reqsize); 726 + crypto_ahash_set_reqsize(hash, crypto_tfm_alg_reqsize(tfm)); 727 727 728 728 if (tfm->__crt_alg->cra_type == &crypto_shash_type) 729 729 return crypto_init_ahash_using_shash(tfm); ··· 889 889 if (alg->halg.statesize == 0) 890 890 return -EINVAL; 891 891 892 - if (alg->reqsize && alg->reqsize < alg->halg.statesize) 892 + if (base->cra_reqsize && base->cra_reqsize < alg->halg.statesize) 893 893 return -EINVAL; 894 894 895 895 err = hash_prepare_alg(&alg->halg);
-3
include/crypto/hash.h
··· 136 136 * This is a counterpart to @init_tfm, used to remove 137 137 * various changes set in @init_tfm. 138 138 * @clone_tfm: Copy transform into new object, may allocate memory. 139 - * @reqsize: Size of the request context. 140 139 * @halg: see struct hash_alg_common 141 140 */ 142 141 struct ahash_alg { ··· 151 152 int (*init_tfm)(struct crypto_ahash *tfm); 152 153 void (*exit_tfm)(struct crypto_ahash *tfm); 153 154 int (*clone_tfm)(struct crypto_ahash *dst, struct crypto_ahash *src); 154 - 155 - unsigned int reqsize; 156 155 157 156 struct hash_alg_common halg; 158 157 };