crypto: qat - Fixed new checkpatch warnings
After updates to checkpatch new warnings pops up this patch fixes them.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Acked-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/drivers/crypto/qat/qat_common/qat_hal.c b/drivers/crypto/qat/qat_common/qat_hal.c
index 260cd71..903ca88 100644
--- a/drivers/crypto/qat/qat_common/qat_hal.c
+++ b/drivers/crypto/qat/qat_common/qat_hal.c
@@ -266,6 +266,7 @@
unsigned short reg_num)
{
unsigned short reg_addr;
+
switch (type) {
case ICP_GPA_ABS:
case ICP_GPB_ABS:
@@ -816,6 +817,7 @@
qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, uaddr);
for (i = 0; i < words_num; i++) {
unsigned int uwrd_lo, uwrd_hi, tmp;
+
uwrd_lo = ((data[i] & 0xfff0000) << 4) | (0x3 << 18) |
((data[i] & 0xff00) << 2) |
(0x3 << 8) | (data[i] & 0xff);
@@ -888,6 +890,7 @@
return -EFAULT;
if (endpc) {
unsigned int ctx_status;
+
qat_hal_rd_indr_csr(handle, ae, ctx, CTX_STS_INDIRECT,
&ctx_status);
*endpc = ctx_status & handle->hal_handle->upc_mask;
@@ -1111,8 +1114,8 @@
alloc_inst_size = lm_init_header->size;
if ((unsigned int)alloc_inst_size > handle->hal_handle->max_ustore)
alloc_inst_size = handle->hal_handle->max_ustore;
- micro_inst_arry = kmalloc(alloc_inst_size * sizeof(uint64_t),
- GFP_KERNEL);
+ micro_inst_arry = kmalloc_array(alloc_inst_size, sizeof(uint64_t),
+ GFP_KERNEL);
if (!micro_inst_arry)
return -ENOMEM;
micro_inst_num = 0;