summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-05-11 17:48:01 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2015-05-13 10:31:41 +0800
commit1b10b9d4687ac711c5ee08a9554d7ad6231e6255 (patch)
tree056bfe6cc4cf03a57ef2f548b301571366dd7c2a
parent2bbe25eba63c09a934bcd8b51455b8f468df49ea (diff)
downloadlinux-crypto-1b10b9d4687ac711c5ee08a9554d7ad6231e6255.tar.gz
linux-crypto-1b10b9d4687ac711c5ee08a9554d7ad6231e6255.zip
crypto: pcrypt - Use crypto_aead_set_reqsize helper
This patch uses the crypto_aead_set_reqsize helper to avoid directly touching the internals of aead. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/pcrypt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
index c305d411..ac115d59 100644
--- a/crypto/pcrypt.c
+++ b/crypto/pcrypt.c
@@ -292,9 +292,10 @@ static int pcrypt_aead_init_tfm(struct crypto_tfm *tfm)
return PTR_ERR(cipher);
ctx->child = cipher;
- tfm->crt_aead.reqsize = sizeof(struct pcrypt_request)
- + sizeof(struct aead_givcrypt_request)
- + crypto_aead_reqsize(cipher);
+ crypto_aead_set_reqsize(__crypto_aead_cast(tfm),
+ sizeof(struct pcrypt_request) +
+ sizeof(struct aead_givcrypt_request) +
+ crypto_aead_reqsize(cipher));
return 0;
}