Commit d65071ec authored by Tadeusz Struk's avatar Tadeusz Struk Committed by Herbert Xu

crypto: qat - Fixed new checkpatch warnings

After updates to checkpatch new warnings pops up this patch fixes them.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Acked-by: default avatarTadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 83530d81
...@@ -95,6 +95,7 @@ static void adf_dev_restore(struct adf_accel_dev *accel_dev) ...@@ -95,6 +95,7 @@ static void adf_dev_restore(struct adf_accel_dev *accel_dev)
pending = ppdstat & PCI_EXP_DEVSTA_TRPND; pending = ppdstat & PCI_EXP_DEVSTA_TRPND;
if (pending) { if (pending) {
int ctr = 0; int ctr = 0;
do { do {
msleep(100); msleep(100);
pci_read_config_word(pdev, PPDSTAT_OFFSET, &ppdstat); pci_read_config_word(pdev, PPDSTAT_OFFSET, &ppdstat);
......
...@@ -57,6 +57,7 @@ static DEFINE_MUTEX(qat_cfg_read_lock); ...@@ -57,6 +57,7 @@ static DEFINE_MUTEX(qat_cfg_read_lock);
static void *qat_dev_cfg_start(struct seq_file *sfile, loff_t *pos) static void *qat_dev_cfg_start(struct seq_file *sfile, loff_t *pos)
{ {
struct adf_cfg_device_data *dev_cfg = sfile->private; struct adf_cfg_device_data *dev_cfg = sfile->private;
mutex_lock(&qat_cfg_read_lock); mutex_lock(&qat_cfg_read_lock);
return seq_list_start(&dev_cfg->sec_list, *pos); return seq_list_start(&dev_cfg->sec_list, *pos);
} }
...@@ -79,6 +80,7 @@ static int qat_dev_cfg_show(struct seq_file *sfile, void *v) ...@@ -79,6 +80,7 @@ static int qat_dev_cfg_show(struct seq_file *sfile, void *v)
static void *qat_dev_cfg_next(struct seq_file *sfile, void *v, loff_t *pos) static void *qat_dev_cfg_next(struct seq_file *sfile, void *v, loff_t *pos)
{ {
struct adf_cfg_device_data *dev_cfg = sfile->private; struct adf_cfg_device_data *dev_cfg = sfile->private;
return seq_list_next(v, &dev_cfg->sec_list, pos); return seq_list_next(v, &dev_cfg->sec_list, pos);
} }
...@@ -100,6 +102,7 @@ static int qat_dev_cfg_open(struct inode *inode, struct file *file) ...@@ -100,6 +102,7 @@ static int qat_dev_cfg_open(struct inode *inode, struct file *file)
if (!ret) { if (!ret) {
struct seq_file *seq_f = file->private_data; struct seq_file *seq_f = file->private_data;
seq_f->private = inode->i_private; seq_f->private = inode->i_private;
} }
return ret; return ret;
......
...@@ -55,6 +55,7 @@ static inline uint32_t adf_modulo(uint32_t data, uint32_t shift) ...@@ -55,6 +55,7 @@ static inline uint32_t adf_modulo(uint32_t data, uint32_t shift)
{ {
uint32_t div = data >> shift; uint32_t div = data >> shift;
uint32_t mult = div << shift; uint32_t mult = div << shift;
return data - mult; return data - mult;
} }
...@@ -68,6 +69,7 @@ static inline int adf_check_ring_alignment(uint64_t addr, uint64_t size) ...@@ -68,6 +69,7 @@ static inline int adf_check_ring_alignment(uint64_t addr, uint64_t size)
static int adf_verify_ring_size(uint32_t msg_size, uint32_t msg_num) static int adf_verify_ring_size(uint32_t msg_size, uint32_t msg_num)
{ {
int i = ADF_MIN_RING_SIZE; int i = ADF_MIN_RING_SIZE;
for (; i <= ADF_MAX_RING_SIZE; i++) for (; i <= ADF_MAX_RING_SIZE; i++)
if ((msg_size * msg_num) == ADF_SIZE_TO_RING_SIZE_IN_BYTES(i)) if ((msg_size * msg_num) == ADF_SIZE_TO_RING_SIZE_IN_BYTES(i))
return i; return i;
......
...@@ -57,6 +57,7 @@ static DEFINE_MUTEX(bank_read_lock); ...@@ -57,6 +57,7 @@ static DEFINE_MUTEX(bank_read_lock);
static void *adf_ring_start(struct seq_file *sfile, loff_t *pos) static void *adf_ring_start(struct seq_file *sfile, loff_t *pos)
{ {
struct adf_etr_ring_data *ring = sfile->private; struct adf_etr_ring_data *ring = sfile->private;
mutex_lock(&ring_read_lock); mutex_lock(&ring_read_lock);
if (*pos == 0) if (*pos == 0)
return SEQ_START_TOKEN; return SEQ_START_TOKEN;
...@@ -143,6 +144,7 @@ static int adf_ring_open(struct inode *inode, struct file *file) ...@@ -143,6 +144,7 @@ static int adf_ring_open(struct inode *inode, struct file *file)
if (!ret) { if (!ret) {
struct seq_file *seq_f = file->private_data; struct seq_file *seq_f = file->private_data;
seq_f->private = inode->i_private; seq_f->private = inode->i_private;
} }
return ret; return ret;
...@@ -258,6 +260,7 @@ static int adf_bank_open(struct inode *inode, struct file *file) ...@@ -258,6 +260,7 @@ static int adf_bank_open(struct inode *inode, struct file *file)
if (!ret) { if (!ret) {
struct seq_file *seq_f = file->private_data; struct seq_file *seq_f = file->private_data;
seq_f->private = inode->i_private; seq_f->private = inode->i_private;
} }
return ret; return ret;
......
...@@ -610,6 +610,7 @@ static void qat_alg_free_bufl(struct qat_crypto_instance *inst, ...@@ -610,6 +610,7 @@ static void qat_alg_free_bufl(struct qat_crypto_instance *inst,
if (blp != blpout) { if (blp != blpout) {
/* If out of place operation dma unmap only data */ /* If out of place operation dma unmap only data */
int bufless = bufs - blout->num_mapped_bufs; int bufless = bufs - blout->num_mapped_bufs;
for (i = bufless; i < bufs; i++) { for (i = bufless; i < bufs; i++) {
dma_unmap_single(dev, blout->bufers[i].addr, dma_unmap_single(dev, blout->bufers[i].addr,
blout->bufers[i].len, blout->bufers[i].len,
...@@ -667,6 +668,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst, ...@@ -667,6 +668,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,
for_each_sg(sgl, sg, n, i) { for_each_sg(sgl, sg, n, i) {
int y = i + bufs; int y = i + bufs;
bufl->bufers[y].addr = dma_map_single(dev, sg_virt(sg), bufl->bufers[y].addr = dma_map_single(dev, sg_virt(sg),
sg->length, sg->length,
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
...@@ -698,6 +700,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst, ...@@ -698,6 +700,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,
} }
for_each_sg(sglout, sg, n, i) { for_each_sg(sglout, sg, n, i) {
int y = i + bufs; int y = i + bufs;
bufers[y].addr = dma_map_single(dev, sg_virt(sg), bufers[y].addr = dma_map_single(dev, sg_virt(sg),
sg->length, sg->length,
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
...@@ -729,6 +732,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst, ...@@ -729,6 +732,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,
if (sgl != sglout && buflout) { if (sgl != sglout && buflout) {
for_each_sg(sglout, sg, n, i) { for_each_sg(sglout, sg, n, i) {
int y = i + bufs; int y = i + bufs;
if (!dma_mapping_error(dev, buflout->bufers[y].addr)) if (!dma_mapping_error(dev, buflout->bufers[y].addr))
dma_unmap_single(dev, buflout->bufers[y].addr, dma_unmap_single(dev, buflout->bufers[y].addr,
buflout->bufers[y].len, buflout->bufers[y].len,
......
...@@ -146,8 +146,8 @@ struct qat_crypto_instance *qat_crypto_get_instance_node(int node) ...@@ -146,8 +146,8 @@ struct qat_crypto_instance *qat_crypto_get_instance_node(int node)
static int qat_crypto_create_instances(struct adf_accel_dev *accel_dev) static int qat_crypto_create_instances(struct adf_accel_dev *accel_dev)
{ {
int i; int i;
long unsigned int bank; unsigned long bank;
long unsigned int num_inst, num_msg_sym, num_msg_asym; unsigned long num_inst, num_msg_sym, num_msg_asym;
int msg_size; int msg_size;
struct qat_crypto_instance *inst; struct qat_crypto_instance *inst;
char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES]; char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES];
......
...@@ -266,6 +266,7 @@ static unsigned short qat_hal_get_reg_addr(unsigned int type, ...@@ -266,6 +266,7 @@ static unsigned short qat_hal_get_reg_addr(unsigned int type,
unsigned short reg_num) unsigned short reg_num)
{ {
unsigned short reg_addr; unsigned short reg_addr;
switch (type) { switch (type) {
case ICP_GPA_ABS: case ICP_GPA_ABS:
case ICP_GPB_ABS: case ICP_GPB_ABS:
...@@ -816,6 +817,7 @@ void qat_hal_wr_umem(struct icp_qat_fw_loader_handle *handle, ...@@ -816,6 +817,7 @@ void qat_hal_wr_umem(struct icp_qat_fw_loader_handle *handle,
qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, uaddr); qat_hal_wr_ae_csr(handle, ae, USTORE_ADDRESS, uaddr);
for (i = 0; i < words_num; i++) { for (i = 0; i < words_num; i++) {
unsigned int uwrd_lo, uwrd_hi, tmp; unsigned int uwrd_lo, uwrd_hi, tmp;
uwrd_lo = ((data[i] & 0xfff0000) << 4) | (0x3 << 18) | uwrd_lo = ((data[i] & 0xfff0000) << 4) | (0x3 << 18) |
((data[i] & 0xff00) << 2) | ((data[i] & 0xff00) << 2) |
(0x3 << 8) | (data[i] & 0xff); (0x3 << 8) | (data[i] & 0xff);
...@@ -888,6 +890,7 @@ static int qat_hal_exec_micro_inst(struct icp_qat_fw_loader_handle *handle, ...@@ -888,6 +890,7 @@ static int qat_hal_exec_micro_inst(struct icp_qat_fw_loader_handle *handle,
return -EFAULT; return -EFAULT;
if (endpc) { if (endpc) {
unsigned int ctx_status; unsigned int ctx_status;
qat_hal_rd_indr_csr(handle, ae, ctx, CTX_STS_INDIRECT, qat_hal_rd_indr_csr(handle, ae, ctx, CTX_STS_INDIRECT,
&ctx_status); &ctx_status);
*endpc = ctx_status & handle->hal_handle->upc_mask; *endpc = ctx_status & handle->hal_handle->upc_mask;
...@@ -1111,7 +1114,7 @@ int qat_hal_batch_wr_lm(struct icp_qat_fw_loader_handle *handle, ...@@ -1111,7 +1114,7 @@ int qat_hal_batch_wr_lm(struct icp_qat_fw_loader_handle *handle,
alloc_inst_size = lm_init_header->size; alloc_inst_size = lm_init_header->size;
if ((unsigned int)alloc_inst_size > handle->hal_handle->max_ustore) if ((unsigned int)alloc_inst_size > handle->hal_handle->max_ustore)
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), micro_inst_arry = kmalloc_array(alloc_inst_size, sizeof(uint64_t),
GFP_KERNEL); GFP_KERNEL);
if (!micro_inst_arry) if (!micro_inst_arry)
return -ENOMEM; return -ENOMEM;
......
...@@ -171,7 +171,6 @@ static void qat_uclo_wr_umem_by_words(struct icp_qat_fw_loader_handle *handle, ...@@ -171,7 +171,6 @@ static void qat_uclo_wr_umem_by_words(struct icp_qat_fw_loader_handle *handle,
num_in_bytes -= 4; num_in_bytes -= 4;
ptr += 4; ptr += 4;
} }
return;
} }
static void qat_uclo_batch_wr_umem(struct icp_qat_fw_loader_handle *handle, static void qat_uclo_batch_wr_umem(struct icp_qat_fw_loader_handle *handle,
...@@ -186,6 +185,7 @@ static void qat_uclo_batch_wr_umem(struct icp_qat_fw_loader_handle *handle, ...@@ -186,6 +185,7 @@ static void qat_uclo_batch_wr_umem(struct icp_qat_fw_loader_handle *handle,
umem_init = umem_init_header->next; umem_init = umem_init_header->next;
while (umem_init) { while (umem_init) {
unsigned int addr, *value, size; unsigned int addr, *value, size;
ae = umem_init->ae; ae = umem_init->ae;
addr = umem_init->addr; addr = umem_init->addr;
value = umem_init->value; value = umem_init->value;
...@@ -204,6 +204,7 @@ qat_uclo_cleanup_batch_init_list(struct icp_qat_fw_loader_handle *handle, ...@@ -204,6 +204,7 @@ qat_uclo_cleanup_batch_init_list(struct icp_qat_fw_loader_handle *handle,
umem_init = *base; umem_init = *base;
while (umem_init) { while (umem_init) {
struct icp_qat_uof_batch_init *pre; struct icp_qat_uof_batch_init *pre;
pre = umem_init; pre = umem_init;
umem_init = umem_init->next; umem_init = umem_init->next;
kfree(pre); kfree(pre);
...@@ -414,7 +415,7 @@ static int qat_uclo_init_ustore(struct icp_qat_fw_loader_handle *handle, ...@@ -414,7 +415,7 @@ static int qat_uclo_init_ustore(struct icp_qat_fw_loader_handle *handle,
uint64_t *fill_data; uint64_t *fill_data;
uof_image = image->img_ptr; uof_image = image->img_ptr;
fill_data = kzalloc(ICP_QAT_UCLO_MAX_USTORE * sizeof(uint64_t), fill_data = kcalloc(ICP_QAT_UCLO_MAX_USTORE, sizeof(uint64_t),
GFP_KERNEL); GFP_KERNEL);
if (!fill_data) if (!fill_data)
return -EFAULT; return -EFAULT;
...@@ -720,6 +721,7 @@ qat_uclo_map_str_table(struct icp_qat_uclo_objhdr *obj_hdr, ...@@ -720,6 +721,7 @@ qat_uclo_map_str_table(struct icp_qat_uclo_objhdr *obj_hdr,
obj_hdr->file_buff, tab_name, NULL); obj_hdr->file_buff, tab_name, NULL);
if (chunk_hdr) { if (chunk_hdr) {
int hdr_size; int hdr_size;
memcpy(&str_table->table_len, obj_hdr->file_buff + memcpy(&str_table->table_len, obj_hdr->file_buff +
chunk_hdr->offset, sizeof(str_table->table_len)); chunk_hdr->offset, sizeof(str_table->table_len));
hdr_size = (char *)&str_table->strings - (char *)str_table; hdr_size = (char *)&str_table->strings - (char *)str_table;
...@@ -821,6 +823,7 @@ static int qat_uclo_init_reg_sym(struct icp_qat_fw_loader_handle *handle, ...@@ -821,6 +823,7 @@ static int qat_uclo_init_reg_sym(struct icp_qat_fw_loader_handle *handle,
for (i = 0; i < encap_ae->init_regsym_num; i++) { for (i = 0; i < encap_ae->init_regsym_num; i++) {
unsigned int exp_res; unsigned int exp_res;
init_regsym = &encap_ae->init_regsym[i]; init_regsym = &encap_ae->init_regsym[i];
exp_res = init_regsym->value; exp_res = init_regsym->value;
switch (init_regsym->init_type) { switch (init_regsym->init_type) {
...@@ -949,7 +952,7 @@ static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle) ...@@ -949,7 +952,7 @@ static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle)
struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle;
unsigned int ae; unsigned int ae;
obj_handle->uword_buf = kzalloc(UWORD_CPYBUF_SIZE * sizeof(uint64_t), obj_handle->uword_buf = kcalloc(UWORD_CPYBUF_SIZE, sizeof(uint64_t),
GFP_KERNEL); GFP_KERNEL);
if (!obj_handle->uword_buf) if (!obj_handle->uword_buf)
return -ENOMEM; return -ENOMEM;
...@@ -957,20 +960,20 @@ static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle) ...@@ -957,20 +960,20 @@ static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle)
obj_handle->encap_uof_obj.obj_hdr = (struct icp_qat_uof_objhdr *) obj_handle->encap_uof_obj.obj_hdr = (struct icp_qat_uof_objhdr *)
obj_handle->obj_hdr->file_buff; obj_handle->obj_hdr->file_buff;
obj_handle->encap_uof_obj.chunk_hdr = (struct icp_qat_uof_chunkhdr *) obj_handle->encap_uof_obj.chunk_hdr = (struct icp_qat_uof_chunkhdr *)
obj_handle->obj_hdr->file_buff + sizeof(struct icp_qat_uof_objhdr); (obj_handle->obj_hdr->file_buff + sizeof(struct icp_qat_uof_objhdr));
obj_handle->uword_in_bytes = 6; obj_handle->uword_in_bytes = 6;
obj_handle->prod_type = ICP_QAT_AC_C_CPU_TYPE; obj_handle->prod_type = ICP_QAT_AC_C_CPU_TYPE;
obj_handle->prod_rev = PID_MAJOR_REV | obj_handle->prod_rev = PID_MAJOR_REV |
(PID_MINOR_REV & handle->hal_handle->revision_id); (PID_MINOR_REV & handle->hal_handle->revision_id);
if (qat_uclo_check_uof_compat(obj_handle)) { if (qat_uclo_check_uof_compat(obj_handle)) {
pr_err("QAT: uof incompatible\n "); pr_err("QAT: uof incompatible\n");
return -EINVAL; return -EINVAL;
} }
obj_handle->ustore_phy_size = ICP_QAT_UCLO_MAX_USTORE; obj_handle->ustore_phy_size = ICP_QAT_UCLO_MAX_USTORE;
if (!(obj_handle->obj_hdr->file_buff) || if (!(obj_handle->obj_hdr->file_buff) ||
!(qat_uclo_map_str_table(obj_handle->obj_hdr, ICP_QAT_UOF_STRT, !(qat_uclo_map_str_table(obj_handle->obj_hdr, ICP_QAT_UOF_STRT,
&(obj_handle->str_table)))) { &(obj_handle->str_table)))) {
pr_err("QAT: uof doesn't have effective images"); pr_err("QAT: uof doesn't have effective images\n");
goto out_err; goto out_err;
} }
obj_handle->uimage_num = obj_handle->uimage_num =
...@@ -979,7 +982,7 @@ static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle) ...@@ -979,7 +982,7 @@ static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle)
if (!obj_handle->uimage_num) if (!obj_handle->uimage_num)
goto out_err; goto out_err;
if (qat_uclo_map_ae(handle, handle->hal_handle->ae_max_num)) { if (qat_uclo_map_ae(handle, handle->hal_handle->ae_max_num)) {
pr_err("QAT: Bad object\n "); pr_err("QAT: Bad object\n");
goto out_check_uof_aemask_err; goto out_check_uof_aemask_err;
} }
qat_uclo_init_uword_num(handle); qat_uclo_init_uword_num(handle);
......
...@@ -63,29 +63,29 @@ ...@@ -63,29 +63,29 @@
#define WRITE_CSR_ARB_RINGSRVARBEN(csr_addr, index, value) \ #define WRITE_CSR_ARB_RINGSRVARBEN(csr_addr, index, value) \
ADF_CSR_WR(csr_addr, ADF_ARB_RINGSRVARBEN_OFFSET + \ ADF_CSR_WR(csr_addr, ADF_ARB_RINGSRVARBEN_OFFSET + \
(ADF_ARB_REG_SLOT * index), value); (ADF_ARB_REG_SLOT * index), value)
#define WRITE_CSR_ARB_RESPORDERING(csr_addr, index, value) \ #define WRITE_CSR_ARB_RESPORDERING(csr_addr, index, value) \
ADF_CSR_WR(csr_addr, (ADF_ARB_OFFSET + \ ADF_CSR_WR(csr_addr, (ADF_ARB_OFFSET + \
ADF_ARB_RO_EN_OFFSET) + (ADF_ARB_REG_SIZE * index), value); ADF_ARB_RO_EN_OFFSET) + (ADF_ARB_REG_SIZE * index), value)
#define WRITE_CSR_ARB_WEIGHT(csr_addr, arb, index, value) \ #define WRITE_CSR_ARB_WEIGHT(csr_addr, arb, index, value) \
ADF_CSR_WR(csr_addr, (ADF_ARB_OFFSET + \ ADF_CSR_WR(csr_addr, (ADF_ARB_OFFSET + \
ADF_ARB_WTR_OFFSET) + (ADF_ARB_WTR_SIZE * arb) + \ ADF_ARB_WTR_OFFSET) + (ADF_ARB_WTR_SIZE * arb) + \
(ADF_ARB_REG_SIZE * index), value); (ADF_ARB_REG_SIZE * index), value)
#define WRITE_CSR_ARB_SARCONFIG(csr_addr, index, value) \ #define WRITE_CSR_ARB_SARCONFIG(csr_addr, index, value) \
ADF_CSR_WR(csr_addr, ADF_ARB_OFFSET + \ ADF_CSR_WR(csr_addr, ADF_ARB_OFFSET + \
(ADF_ARB_REG_SIZE * index), value); (ADF_ARB_REG_SIZE * index), value)
#define WRITE_CSR_ARB_WRK_2_SER_MAP(csr_addr, index, value) \ #define WRITE_CSR_ARB_WRK_2_SER_MAP(csr_addr, index, value) \
ADF_CSR_WR(csr_addr, (ADF_ARB_OFFSET + \ ADF_CSR_WR(csr_addr, (ADF_ARB_OFFSET + \
ADF_ARB_WRK_2_SER_MAP_OFFSET) + \ ADF_ARB_WRK_2_SER_MAP_OFFSET) + \
(ADF_ARB_REG_SIZE * index), value); (ADF_ARB_REG_SIZE * index), value)
#define WRITE_CSR_ARB_WQCFG(csr_addr, index, value) \ #define WRITE_CSR_ARB_WQCFG(csr_addr, index, value) \
ADF_CSR_WR(csr_addr, (ADF_ARB_OFFSET + \ ADF_CSR_WR(csr_addr, (ADF_ARB_OFFSET + \
ADF_ARB_WQCFG_OFFSET) + (ADF_ARB_REG_SIZE * index), value); ADF_ARB_WQCFG_OFFSET) + (ADF_ARB_REG_SIZE * index), value)
int adf_init_arb(struct adf_accel_dev *accel_dev) int adf_init_arb(struct adf_accel_dev *accel_dev)
{ {
......
...@@ -172,7 +172,7 @@ static int adf_isr_alloc_msix_entry_table(struct adf_accel_dev *accel_dev) ...@@ -172,7 +172,7 @@ static int adf_isr_alloc_msix_entry_table(struct adf_accel_dev *accel_dev)
if (!entries) if (!entries)
return -ENOMEM; return -ENOMEM;
names = kzalloc(msix_num_entries * sizeof(char *), GFP_KERNEL); names = kcalloc(msix_num_entries, sizeof(char *), GFP_KERNEL);
if (!names) { if (!names) {
kfree(entries); kfree(entries);
return -ENOMEM; return -ENOMEM;
......
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