summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTadeusz Struk <tadeusz.struk@intel.com>2014-07-25 15:55:41 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2014-08-01 22:36:06 +0800
commit8c1f8e3bbf60d0d06190be81f55d5199d52a463f (patch)
tree3fa3da68bfcf4bfb44c09689740ce79860b9f326 /drivers
parentdf0088f50712f9540769c542d0b4d27acc4fc527 (diff)
crypto: qat - change slice->regions to slice->region
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> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/qat/qat_common/icp_qat_uclo.h2
-rw-r--r--drivers/crypto/qat/qat_common/qat_uclo.c22
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 120fbce517a9..2132a8cbc4ec 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 b1a16eb5a36d..557fa606da89 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;
}