Commit 7768fb2e authored by Cabiddu, Giovanni's avatar Cabiddu, Giovanni Committed by Herbert Xu

crypto: qat - Reduced reqsize in qat_algs

req_alloc functions already take into account the request data structure
when allocating memory.
Signed-off-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0f987e25
...@@ -1064,8 +1064,7 @@ static int qat_alg_aead_init(struct crypto_aead *tfm, ...@@ -1064,8 +1064,7 @@ static int qat_alg_aead_init(struct crypto_aead *tfm,
if (IS_ERR(ctx->hash_tfm)) if (IS_ERR(ctx->hash_tfm))
return PTR_ERR(ctx->hash_tfm); return PTR_ERR(ctx->hash_tfm);
ctx->qat_hash_alg = hash; ctx->qat_hash_alg = hash;
crypto_aead_set_reqsize(tfm, sizeof(struct aead_request) + crypto_aead_set_reqsize(tfm, sizeof(struct qat_crypto_request));
sizeof(struct qat_crypto_request));
return 0; return 0;
} }
...@@ -1114,8 +1113,7 @@ static int qat_alg_ablkcipher_init(struct crypto_tfm *tfm) ...@@ -1114,8 +1113,7 @@ static int qat_alg_ablkcipher_init(struct crypto_tfm *tfm)
struct qat_alg_ablkcipher_ctx *ctx = crypto_tfm_ctx(tfm); struct qat_alg_ablkcipher_ctx *ctx = crypto_tfm_ctx(tfm);
spin_lock_init(&ctx->lock); spin_lock_init(&ctx->lock);
tfm->crt_ablkcipher.reqsize = sizeof(struct ablkcipher_request) + tfm->crt_ablkcipher.reqsize = sizeof(struct qat_crypto_request);
sizeof(struct qat_crypto_request);
ctx->tfm = tfm; ctx->tfm = tfm;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment