Commit fe278bf3 authored by Jack Xu's avatar Jack Xu Committed by Herbert Xu

crypto: qat - change type for ctx_mask

Change type for ctx_mask from unsigned char to unsigned long to avoid
type casting.
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 72b67d95
...@@ -163,19 +163,19 @@ int qat_hal_batch_wr_lm(struct icp_qat_fw_loader_handle *handle, ...@@ -163,19 +163,19 @@ int qat_hal_batch_wr_lm(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned char ae,
struct icp_qat_uof_batch_init *lm_init_header); struct icp_qat_uof_batch_init *lm_init_header);
int qat_hal_init_gpr(struct icp_qat_fw_loader_handle *handle, int qat_hal_init_gpr(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned char ctx_mask, unsigned char ae, unsigned long ctx_mask,
enum icp_qat_uof_regtype reg_type, enum icp_qat_uof_regtype reg_type,
unsigned short reg_num, unsigned int regdata); unsigned short reg_num, unsigned int regdata);
int qat_hal_init_wr_xfer(struct icp_qat_fw_loader_handle *handle, int qat_hal_init_wr_xfer(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned char ctx_mask, unsigned char ae, unsigned long ctx_mask,
enum icp_qat_uof_regtype reg_type, enum icp_qat_uof_regtype reg_type,
unsigned short reg_num, unsigned int regdata); unsigned short reg_num, unsigned int regdata);
int qat_hal_init_rd_xfer(struct icp_qat_fw_loader_handle *handle, int qat_hal_init_rd_xfer(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned char ctx_mask, unsigned char ae, unsigned long ctx_mask,
enum icp_qat_uof_regtype reg_type, enum icp_qat_uof_regtype reg_type,
unsigned short reg_num, unsigned int regdata); unsigned short reg_num, unsigned int regdata);
int qat_hal_init_nn(struct icp_qat_fw_loader_handle *handle, int qat_hal_init_nn(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned char ctx_mask, unsigned char ae, unsigned long ctx_mask,
unsigned short reg_num, unsigned int regdata); unsigned short reg_num, unsigned int regdata);
int qat_hal_wr_lm(struct icp_qat_fw_loader_handle *handle, int qat_hal_wr_lm(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned short lm_addr, unsigned int value); unsigned char ae, unsigned short lm_addr, unsigned int value);
......
...@@ -1274,7 +1274,7 @@ static int qat_hal_convert_abs_to_rel(struct icp_qat_fw_loader_handle ...@@ -1274,7 +1274,7 @@ static int qat_hal_convert_abs_to_rel(struct icp_qat_fw_loader_handle
} }
int qat_hal_init_gpr(struct icp_qat_fw_loader_handle *handle, int qat_hal_init_gpr(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned char ctx_mask, unsigned char ae, unsigned long ctx_mask,
enum icp_qat_uof_regtype reg_type, enum icp_qat_uof_regtype reg_type,
unsigned short reg_num, unsigned int regdata) unsigned short reg_num, unsigned int regdata)
{ {
...@@ -1294,7 +1294,7 @@ int qat_hal_init_gpr(struct icp_qat_fw_loader_handle *handle, ...@@ -1294,7 +1294,7 @@ int qat_hal_init_gpr(struct icp_qat_fw_loader_handle *handle,
} else { } else {
reg = reg_num; reg = reg_num;
type = reg_type; type = reg_type;
if (!test_bit(ctx, (unsigned long *)&ctx_mask)) if (!test_bit(ctx, &ctx_mask))
continue; continue;
} }
stat = qat_hal_wr_rel_reg(handle, ae, ctx, type, reg, regdata); stat = qat_hal_wr_rel_reg(handle, ae, ctx, type, reg, regdata);
...@@ -1308,7 +1308,7 @@ int qat_hal_init_gpr(struct icp_qat_fw_loader_handle *handle, ...@@ -1308,7 +1308,7 @@ int qat_hal_init_gpr(struct icp_qat_fw_loader_handle *handle,
} }
int qat_hal_init_wr_xfer(struct icp_qat_fw_loader_handle *handle, int qat_hal_init_wr_xfer(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned char ctx_mask, unsigned char ae, unsigned long ctx_mask,
enum icp_qat_uof_regtype reg_type, enum icp_qat_uof_regtype reg_type,
unsigned short reg_num, unsigned int regdata) unsigned short reg_num, unsigned int regdata)
{ {
...@@ -1328,7 +1328,7 @@ int qat_hal_init_wr_xfer(struct icp_qat_fw_loader_handle *handle, ...@@ -1328,7 +1328,7 @@ int qat_hal_init_wr_xfer(struct icp_qat_fw_loader_handle *handle,
} else { } else {
reg = reg_num; reg = reg_num;
type = reg_type; type = reg_type;
if (!test_bit(ctx, (unsigned long *)&ctx_mask)) if (!test_bit(ctx, &ctx_mask))
continue; continue;
} }
stat = qat_hal_put_rel_wr_xfer(handle, ae, ctx, type, reg, stat = qat_hal_put_rel_wr_xfer(handle, ae, ctx, type, reg,
...@@ -1343,7 +1343,7 @@ int qat_hal_init_wr_xfer(struct icp_qat_fw_loader_handle *handle, ...@@ -1343,7 +1343,7 @@ int qat_hal_init_wr_xfer(struct icp_qat_fw_loader_handle *handle,
} }
int qat_hal_init_rd_xfer(struct icp_qat_fw_loader_handle *handle, int qat_hal_init_rd_xfer(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned char ctx_mask, unsigned char ae, unsigned long ctx_mask,
enum icp_qat_uof_regtype reg_type, enum icp_qat_uof_regtype reg_type,
unsigned short reg_num, unsigned int regdata) unsigned short reg_num, unsigned int regdata)
{ {
...@@ -1363,7 +1363,7 @@ int qat_hal_init_rd_xfer(struct icp_qat_fw_loader_handle *handle, ...@@ -1363,7 +1363,7 @@ int qat_hal_init_rd_xfer(struct icp_qat_fw_loader_handle *handle,
} else { } else {
reg = reg_num; reg = reg_num;
type = reg_type; type = reg_type;
if (!test_bit(ctx, (unsigned long *)&ctx_mask)) if (!test_bit(ctx, &ctx_mask))
continue; continue;
} }
stat = qat_hal_put_rel_rd_xfer(handle, ae, ctx, type, reg, stat = qat_hal_put_rel_rd_xfer(handle, ae, ctx, type, reg,
...@@ -1378,7 +1378,7 @@ int qat_hal_init_rd_xfer(struct icp_qat_fw_loader_handle *handle, ...@@ -1378,7 +1378,7 @@ int qat_hal_init_rd_xfer(struct icp_qat_fw_loader_handle *handle,
} }
int qat_hal_init_nn(struct icp_qat_fw_loader_handle *handle, int qat_hal_init_nn(struct icp_qat_fw_loader_handle *handle,
unsigned char ae, unsigned char ctx_mask, unsigned char ae, unsigned long ctx_mask,
unsigned short reg_num, unsigned int regdata) unsigned short reg_num, unsigned int regdata)
{ {
int stat = 0; int stat = 0;
...@@ -1388,7 +1388,7 @@ int qat_hal_init_nn(struct icp_qat_fw_loader_handle *handle, ...@@ -1388,7 +1388,7 @@ int qat_hal_init_nn(struct icp_qat_fw_loader_handle *handle,
return -EINVAL; return -EINVAL;
for (ctx = 0; ctx < ICP_QAT_UCLO_MAX_CTX; ctx++) { for (ctx = 0; ctx < ICP_QAT_UCLO_MAX_CTX; ctx++) {
if (!test_bit(ctx, (unsigned long *)&ctx_mask)) if (!test_bit(ctx, &ctx_mask))
continue; continue;
stat = qat_hal_put_rel_nn(handle, ae, ctx, reg_num, regdata); stat = qat_hal_put_rel_nn(handle, ae, ctx, reg_num, regdata);
if (stat) { if (stat) {
......
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