Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97cacb9f authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: qat - 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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 9611ef63
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -1094,8 +1094,9 @@ static int qat_alg_aead_init(struct crypto_tfm *tfm,
		return -EFAULT;
		return -EFAULT;
	spin_lock_init(&ctx->lock);
	spin_lock_init(&ctx->lock);
	ctx->qat_hash_alg = hash;
	ctx->qat_hash_alg = hash;
	tfm->crt_aead.reqsize = sizeof(struct aead_request) +
	crypto_aead_set_reqsize(__crypto_aead_cast(tfm),
				sizeof(struct qat_crypto_request);
		sizeof(struct aead_request) +
		sizeof(struct qat_crypto_request));
	ctx->tfm = tfm;
	ctx->tfm = tfm;
	return 0;
	return 0;
}
}