crypto: qat - Use crypto_aead_set_reqsize helper
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 11 May 2015 09:48:09 +0000 (17:48 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 13 May 2015 02:31:45 +0000 (10:31 +0800)
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>
drivers/crypto/qat/qat_common/qat_algs.c

index 070abcd0f2b3a6576defe16e5051ac3bea1d6b3b..dc231b860a1eac20b75b1a7df3fede2c77a9c537 100644 (file)
@@ -1094,8 +1094,9 @@ static int qat_alg_aead_init(struct crypto_tfm *tfm,
                return -EFAULT;
        spin_lock_init(&ctx->lock);
        ctx->qat_hash_alg = hash;
-       tfm->crt_aead.reqsize = sizeof(struct aead_request) +
-                               sizeof(struct qat_crypto_request);
+       crypto_aead_set_reqsize(__crypto_aead_cast(tfm),
+               sizeof(struct aead_request) +
+               sizeof(struct qat_crypto_request));
        ctx->tfm = tfm;
        return 0;
 }