From: Herbert Xu Date: Mon, 11 May 2015 09:48:01 +0000 (+0800) Subject: crypto: pcrypt - Use crypto_aead_set_reqsize helper X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fd0de97890d88b979c2731bd5b70d504175fc2ed;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c index c305d4112735..ac115d591d66 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; }