diff options
author | Cabiddu, Giovanni <giovanni.cabiddu@intel.com> | 2016-01-19 12:34:04 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-01-25 09:42:10 -0500 |
commit | 7768fb2ee9e907bfa91d13cb698fa68880ddc80a (patch) | |
tree | c301c64de9abb59ac7552dda35b32ec3c76a87fa | |
parent | 0f987e25cb8a9c23bfd70942a580c2698444e4b4 (diff) |
crypto: qat - Reduced reqsize in qat_algs
req_alloc functions already take into account the request data structure
when allocating memory.
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/qat/qat_common/qat_algs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index 59e4c3af15ed..1e8852a8a057 100644 --- a/drivers/crypto/qat/qat_common/qat_algs.c +++ b/drivers/crypto/qat/qat_common/qat_algs.c | |||
@@ -1064,8 +1064,7 @@ static int qat_alg_aead_init(struct crypto_aead *tfm, | |||
1064 | if (IS_ERR(ctx->hash_tfm)) | 1064 | if (IS_ERR(ctx->hash_tfm)) |
1065 | return PTR_ERR(ctx->hash_tfm); | 1065 | return PTR_ERR(ctx->hash_tfm); |
1066 | ctx->qat_hash_alg = hash; | 1066 | ctx->qat_hash_alg = hash; |
1067 | crypto_aead_set_reqsize(tfm, sizeof(struct aead_request) + | 1067 | crypto_aead_set_reqsize(tfm, sizeof(struct qat_crypto_request)); |
1068 | sizeof(struct qat_crypto_request)); | ||
1069 | return 0; | 1068 | return 0; |
1070 | } | 1069 | } |
1071 | 1070 | ||
@@ -1114,8 +1113,7 @@ static int qat_alg_ablkcipher_init(struct crypto_tfm *tfm) | |||
1114 | struct qat_alg_ablkcipher_ctx *ctx = crypto_tfm_ctx(tfm); | 1113 | struct qat_alg_ablkcipher_ctx *ctx = crypto_tfm_ctx(tfm); |
1115 | 1114 | ||
1116 | spin_lock_init(&ctx->lock); | 1115 | spin_lock_init(&ctx->lock); |
1117 | tfm->crt_ablkcipher.reqsize = sizeof(struct ablkcipher_request) + | 1116 | tfm->crt_ablkcipher.reqsize = sizeof(struct qat_crypto_request); |
1118 | sizeof(struct qat_crypto_request); | ||
1119 | ctx->tfm = tfm; | 1117 | ctx->tfm = tfm; |
1120 | return 0; | 1118 | return 0; |
1121 | } | 1119 | } |