From: Tadeusz Struk <tadeusz.struk@intel.com>
To: <herbert@gondor.apana.org.au>
Cc: <tadeusz.struk@intel.com>, <davem@davemloft.net>,
<bruce.w.allan@intel.com>, <bo.cui@intel.com>,
<pingchao.yang@intel.com>, <qat-linux@intel.com>,
<linux-crypto@vger.kernel.org>
Subject: [PATCH 06/10] crypto: qat: Cleanup - change slice->regions to slice->region
Date: Fri, 25 Jul 2014 15:55:41 -0700 [thread overview]
Message-ID: <20140725225541.24909.28307.stgit@gitlad.jf.intel.com> (raw)
In-Reply-To: <20140725225410.24909.56360.stgit@gitlad.jf.intel.com>
Change ptr name slice->regions to slice->region to reflect the same
in the page struct.
Signed-off-by: Pingchao Yang <pingchao.yang@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
---
drivers/crypto/qat/qat_common/icp_qat_uclo.h | 2 +-
drivers/crypto/qat/qat_common/qat_uclo.c | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/crypto/qat/qat_common/icp_qat_uclo.h b/drivers/crypto/qat/qat_common/icp_qat_uclo.h
index 120fbce..2132a8c 100644
--- a/drivers/crypto/qat/qat_common/icp_qat_uclo.h
+++ b/drivers/crypto/qat/qat_common/icp_qat_uclo.h
@@ -124,7 +124,7 @@ struct icp_qat_uclo_region {
};
struct icp_qat_uclo_aeslice {
- struct icp_qat_uclo_region *regions;
+ struct icp_qat_uclo_region *region;
struct icp_qat_uclo_page *page;
struct icp_qat_uclo_page *cur_page[ICP_QAT_UCLO_MAX_CTX];
struct icp_qat_uclo_encapme *encap_image;
diff --git a/drivers/crypto/qat/qat_common/qat_uclo.c b/drivers/crypto/qat/qat_common/qat_uclo.c
index b1a16eb..557fa60 100644
--- a/drivers/crypto/qat/qat_common/qat_uclo.c
+++ b/drivers/crypto/qat/qat_common/qat_uclo.c
@@ -79,37 +79,37 @@ static int qat_uclo_init_ae_data(struct icp_qat_uclo_objhandle *obj_handle,
} else {
ae_slice->ctx_mask_assigned = 0;
}
- ae_slice->regions = kzalloc(sizeof(*ae_slice->regions), GFP_KERNEL);
- if (!ae_slice->regions)
+ ae_slice->region = kzalloc(sizeof(*ae_slice->region), GFP_KERNEL);
+ if (!ae_slice->region)
return -ENOMEM;
ae_slice->page = kzalloc(sizeof(*ae_slice->page), GFP_KERNEL);
if (!ae_slice->page)
goto out_err;
page = ae_slice->page;
page->encap_page = encap_image->page;
- ae_slice->page->region = ae_slice->regions;
+ ae_slice->page->region = ae_slice->region;
ae_data->slice_num++;
return 0;
out_err:
- kfree(ae_slice->regions);
- ae_slice->regions = NULL;
+ kfree(ae_slice->region);
+ ae_slice->region = NULL;
return -ENOMEM;
}
static int qat_uclo_free_ae_data(struct icp_qat_uclo_aedata *ae_data)
{
- unsigned int ss = 0;
+ unsigned int i;
if (!ae_data) {
pr_err("QAT: bad argument, ae_data is NULL\n ");
return -EINVAL;
}
- for (ss = 0; ss < ae_data->slice_num; ss++) {
- kfree(ae_data->ae_slices[ss].regions);
- ae_data->ae_slices[ss].regions = NULL;
- kfree(ae_data->ae_slices[ss].page);
- ae_data->ae_slices[ss].page = NULL;
+ for (i = 0; i < ae_data->slice_num; i++) {
+ kfree(ae_data->ae_slices[i].region);
+ ae_data->ae_slices[i].region = NULL;
+ kfree(ae_data->ae_slices[i].page);
+ ae_data->ae_slices[i].page = NULL;
}
return 0;
}
next prev parent reply other threads:[~2014-07-25 22:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 22:55 [PATCH 00/10] crypto: qat: Checkpatch and other cleanups plus SKU1 Tadeusz Struk
2014-07-25 22:55 ` [PATCH 01/10] crypto: qat: Cleanup - remove unnecessary return codes Tadeusz Struk
2014-07-25 22:55 ` [PATCH 02/10] crypto: qat: Cleanup - checkpatch blank lines Tadeusz Struk
2014-07-25 22:55 ` [PATCH 03/10] crypto: qat: Cleanup - remove unneeded header Tadeusz Struk
2014-07-25 22:55 ` [PATCH 04/10] crypto: qat: Cleanup - remove unnecessary parentheses Tadeusz Struk
2014-07-25 22:55 ` [PATCH 05/10] crypto: qat: Cleanup - use min_t macro Tadeusz Struk
2014-07-25 22:55 ` Tadeusz Struk [this message]
2014-07-25 22:55 ` [PATCH 07/10] crypto: qat: Cleanup - change ae_num to ae_id Tadeusz Struk
2014-07-25 22:55 ` [PATCH 08/10] crypto: qat: Cleanup - Updated print outputs Tadeusz Struk
2014-07-25 22:55 ` [PATCH 09/10] crypto: qat: Cleanup - Use hweight for bit counting Tadeusz Struk
2014-07-25 22:56 ` [PATCH 10/10] crypto: qat: Fixed SKU1 dev issue Tadeusz Struk
2014-08-01 14:39 ` [PATCH 00/10] crypto: qat: Checkpatch and other cleanups plus SKU1 Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140725225541.24909.28307.stgit@gitlad.jf.intel.com \
--to=tadeusz.struk@intel.com \
--cc=bo.cui@intel.com \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=pingchao.yang@intel.com \
--cc=qat-linux@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.