Commit 8ec0bee5 authored by Jack Xu's avatar Jack Xu Committed by Herbert Xu

crypto: qat - remove unnecessary parenthesis

Remove unnecessary parenthesis across the firmware loader.
Signed-off-by: default avatarJack Xu <jack.xu@intel.com>
Co-developed-by: default avatarWojciech Ziemba <wojciech.ziemba@intel.com>
Signed-off-by: default avatarWojciech Ziemba <wojciech.ziemba@intel.com>
Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ed8fc0c1
......@@ -158,7 +158,7 @@ int qat_hal_set_ae_ctx_mode(struct icp_qat_fw_loader_handle *handle,
{
unsigned int csr, new_csr;
if ((mode != 4) && (mode != 8)) {
if (mode != 4 && mode != 8) {
pr_err("QAT: bad ctx mode=%d\n", mode);
return -EINVAL;
}
......@@ -430,7 +430,7 @@ static int qat_hal_init_esram(struct icp_qat_fw_loader_handle *handle)
qat_hal_wait_cycles(handle, 0, ESRAM_AUTO_INIT_USED_CYCLES, 0);
csr_val = ADF_CSR_RD(csr_addr, 0);
} while (!(csr_val & ESRAM_AUTO_TINIT_DONE) && times--);
if ((times < 0)) {
if (times < 0) {
pr_err("QAT: Fail to init eSram!\n");
return -EFAULT;
}
......@@ -1128,7 +1128,7 @@ int qat_hal_batch_wr_lm(struct icp_qat_fw_loader_handle *handle,
plm_init = plm_init->next;
}
/* exec micro codes */
if (micro_inst_arry && (micro_inst_num > 0)) {
if (micro_inst_arry && micro_inst_num > 0) {
micro_inst_arry[micro_inst_num++] = 0x0E000010000ull;
stat = qat_hal_exec_micro_init_lm(handle, ae, 0, &first_exec,
micro_inst_arry,
......
......@@ -74,7 +74,7 @@ static int qat_uclo_free_ae_data(struct icp_qat_uclo_aedata *ae_data)
static char *qat_uclo_get_string(struct icp_qat_uof_strtable *str_table,
unsigned int str_offset)
{
if ((!str_table->table_len) || (str_offset > str_table->table_len))
if (!str_table->table_len || str_offset > str_table->table_len)
return NULL;
return (char *)(((uintptr_t)(str_table->strings)) + str_offset);
}
......@@ -736,8 +736,8 @@ static int qat_uclo_check_uof_compat(struct icp_qat_uclo_objhandle *obj_handle)
return -EINVAL;
}
maj_ver = obj_handle->prod_rev & 0xff;
if ((obj_handle->encap_uof_obj.obj_hdr->max_cpu_ver < maj_ver) ||
(obj_handle->encap_uof_obj.obj_hdr->min_cpu_ver > maj_ver)) {
if (obj_handle->encap_uof_obj.obj_hdr->max_cpu_ver < maj_ver ||
obj_handle->encap_uof_obj.obj_hdr->min_cpu_ver > maj_ver) {
pr_err("QAT: UOF majVer 0x%x out of range\n", maj_ver);
return -EINVAL;
}
......@@ -1064,8 +1064,8 @@ static int qat_uclo_check_simg_compat(struct icp_qat_fw_loader_handle *handle,
return -EINVAL;
}
maj_ver = prod_rev & 0xff;
if ((maj_ver > img_ae_mode->devmax_ver) ||
(maj_ver < img_ae_mode->devmin_ver)) {
if (maj_ver > img_ae_mode->devmax_ver ||
maj_ver < img_ae_mode->devmin_ver) {
pr_err("QAT: incompatible device majver 0x%x\n", maj_ver);
return -EINVAL;
}
......@@ -1108,7 +1108,7 @@ static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle,
unsigned int i = 0;
struct icp_qat_suof_img_hdr img_header;
if (!suof_ptr || (suof_size == 0)) {
if (!suof_ptr || suof_size == 0) {
pr_err("QAT: input parameter SUOF pointer/size is NULL\n");
return -EINVAL;
}
......@@ -1199,7 +1199,7 @@ static void qat_uclo_simg_free(struct icp_qat_fw_loader_handle *handle,
{
dma_free_coherent(&handle->pci_dev->dev,
(size_t)(dram_desc->dram_size),
(dram_desc->dram_base_addr_v),
dram_desc->dram_base_addr_v,
dram_desc->dram_bus_addr);
memset(dram_desc, 0, sizeof(*dram_desc));
}
......@@ -1851,7 +1851,7 @@ static int qat_uclo_wr_suof_img(struct icp_qat_fw_loader_handle *handle)
if (qat_uclo_map_auth_fw(handle,
(char *)simg_hdr[i].simg_buf,
(unsigned int)
(simg_hdr[i].simg_len),
simg_hdr[i].simg_len,
&desc))
goto wr_err;
if (qat_uclo_auth_fw(handle, desc))
......
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