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: kpp - Move reqsize into tfm

The value of reqsize cannot be determined in case of fallbacks.
Therefore it must be stored in the tfm and not the alg object.

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

+6 -5
+1 -1
include/crypto/internal/kpp.h
··· 53 53 static inline void kpp_set_reqsize(struct crypto_kpp *kpp, 54 54 unsigned int reqsize) 55 55 { 56 - crypto_kpp_alg(kpp)->reqsize = reqsize; 56 + kpp->reqsize = reqsize; 57 57 } 58 58 59 59 static inline void *kpp_tfm_ctx(struct crypto_kpp *tfm)
+5 -4
include/crypto/kpp.h
··· 37 37 * struct crypto_kpp - user-instantiated object which encapsulate 38 38 * algorithms and core processing logic 39 39 * 40 + * @reqsize: Request context size required by algorithm 41 + * implementation 40 42 * @base: Common crypto API algorithm data structure 41 43 */ 42 44 struct crypto_kpp { 45 + unsigned int reqsize; 46 + 43 47 struct crypto_tfm base; 44 48 }; 45 49 ··· 68 64 * put in place here. 69 65 * @exit: Undo everything @init did. 70 66 * 71 - * @reqsize: Request context size required by algorithm 72 - * implementation 73 67 * @base: Common crypto API algorithm data structure 74 68 */ 75 69 struct kpp_alg { ··· 81 79 int (*init)(struct crypto_kpp *tfm); 82 80 void (*exit)(struct crypto_kpp *tfm); 83 81 84 - unsigned int reqsize; 85 82 struct crypto_alg base; 86 83 }; 87 84 ··· 129 128 130 129 static inline unsigned int crypto_kpp_reqsize(struct crypto_kpp *tfm) 131 130 { 132 - return crypto_kpp_alg(tfm)->reqsize; 131 + return tfm->reqsize; 133 132 } 134 133 135 134 static inline void kpp_request_set_tfm(struct kpp_request *req,