summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/cache.c3
-rw-r--r--drivers/infiniband/core/cm.c3
-rw-r--r--drivers/infiniband/core/cma.c9
-rw-r--r--drivers/infiniband/core/roce_gid_mgmt.c3
-rw-r--r--drivers/infiniband/core/rw.c6
-rw-r--r--drivers/infiniband/core/sa_query.c3
-rw-r--r--drivers/infiniband/core/sysfs.c9
-rw-r--r--drivers/infiniband/core/user_mad.c3
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c3
-rw-r--r--drivers/infiniband/hw/bng_re/bng_fw.c3
-rw-r--r--drivers/infiniband/hw/bnxt_re/ib_verbs.c6
-rw-r--r--drivers/infiniband/hw/bnxt_re/qplib_fp.c3
-rw-r--r--drivers/infiniband/hw/bnxt_re/qplib_rcfw.c3
-rw-r--r--drivers/infiniband/hw/cxgb4/qp.c9
-rw-r--r--drivers/infiniband/hw/efa/efa_verbs.c3
-rw-r--r--drivers/infiniband/hw/hfi1/pio.c6
-rw-r--r--drivers/infiniband/hw/hfi1/user_exp_rcv.c3
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_main.c3
-rw-r--r--drivers/infiniband/hw/ionic/ionic_admin.c6
-rw-r--r--drivers/infiniband/hw/ionic/ionic_controlpath.c6
-rw-r--r--drivers/infiniband/hw/ionic/ionic_hw_stats.c9
-rw-r--r--drivers/infiniband/hw/irdma/cm.c6
-rw-r--r--drivers/infiniband/hw/irdma/icrdma_if.c3
-rw-r--r--drivers/infiniband/hw/irdma/ig3rdma_if.c3
-rw-r--r--drivers/infiniband/hw/irdma/verbs.c6
-rw-r--r--drivers/infiniband/hw/mlx4/alias_GUID.c3
-rw-r--r--drivers/infiniband/hw/mlx4/mad.c3
-rw-r--r--drivers/infiniband/hw/mlx4/main.c3
-rw-r--r--drivers/infiniband/hw/mlx4/sysfs.c3
-rw-r--r--drivers/infiniband/hw/mlx5/counters.c6
-rw-r--r--drivers/infiniband/hw/mlx5/fs.c6
-rw-r--r--drivers/infiniband/hw/mlx5/gsi.c3
-rw-r--r--drivers/infiniband/hw/mlx5/mr.c3
-rw-r--r--drivers/infiniband/hw/mlx5/qp.c3
-rw-r--r--drivers/infiniband/hw/mthca/mthca_allocator.c3
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mr.c3
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_main.c6
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_verbs.c3
-rw-r--r--drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c9
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c3
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c3
-rw-r--r--drivers/infiniband/ulp/rtrs/rtrs-clt.c3
-rw-r--r--drivers/infiniband/ulp/rtrs/rtrs-srv.c6
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.c3
44 files changed, 65 insertions, 130 deletions
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
index c066befec91b..21b7753eedad 100644
--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -302,8 +302,7 @@ alloc_gid_entry(const struct ib_gid_attr *attr)
ndev = rcu_dereference_protected(attr->ndev, 1);
if (ndev) {
- entry->ndev_storage = kzalloc_obj(*entry->ndev_storage,
- GFP_KERNEL);
+ entry->ndev_storage = kzalloc_obj(*entry->ndev_storage);
if (!entry->ndev_storage) {
kfree(entry);
return NULL;
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index e65acf97e02f..6ab9a0aee1ec 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -4348,8 +4348,7 @@ static int cm_add_one(struct ib_device *ib_device)
int count = 0;
u32 i;
- cm_dev = kzalloc_flex(*cm_dev, port, ib_device->phys_port_cnt,
- GFP_KERNEL);
+ cm_dev = kzalloc_flex(*cm_dev, port, ib_device->phys_port_cnt);
if (!cm_dev)
return -ENOMEM;
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index df6f34d5e041..d892a597ac2b 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -2300,8 +2300,7 @@ cma_ib_new_conn_id(const struct rdma_cm_id *listen_id,
rt = &id->route;
rt->num_pri_alt_paths = ib_event->param.req_rcvd.alternate_path ? 2 : 1;
- rt->path_rec = kmalloc_objs(*rt->path_rec, rt->num_pri_alt_paths,
- GFP_KERNEL);
+ rt->path_rec = kmalloc_objs(*rt->path_rec, rt->num_pri_alt_paths);
if (!rt->path_rec)
goto err;
@@ -2880,8 +2879,7 @@ static int route_set_path_rec_inbound(struct cma_work *work,
struct rdma_route *route = &work->id->id.route;
if (!route->path_rec_inbound) {
- route->path_rec_inbound = kzalloc_obj(*route->path_rec_inbound,
- GFP_KERNEL);
+ route->path_rec_inbound = kzalloc_obj(*route->path_rec_inbound);
if (!route->path_rec_inbound)
return -ENOMEM;
}
@@ -2896,8 +2894,7 @@ static int route_set_path_rec_outbound(struct cma_work *work,
struct rdma_route *route = &work->id->id.route;
if (!route->path_rec_outbound) {
- route->path_rec_outbound = kzalloc_obj(*route->path_rec_outbound,
- GFP_KERNEL);
+ route->path_rec_outbound = kzalloc_obj(*route->path_rec_outbound);
if (!route->path_rec_outbound)
return -ENOMEM;
}
diff --git a/drivers/infiniband/core/roce_gid_mgmt.c b/drivers/infiniband/core/roce_gid_mgmt.c
index 22c83e44091d..4a2a4638b476 100644
--- a/drivers/infiniband/core/roce_gid_mgmt.c
+++ b/drivers/infiniband/core/roce_gid_mgmt.c
@@ -660,8 +660,7 @@ static int netdevice_queue_work(struct netdev_event_work_cmd *cmds,
struct net_device *ndev)
{
unsigned int i;
- struct netdev_event_work *ndev_work = kmalloc_obj(*ndev_work,
- GFP_KERNEL);
+ struct netdev_event_work *ndev_work = kmalloc_obj(*ndev_work);
if (!ndev_work)
return NOTIFY_DONE;
diff --git a/drivers/infiniband/core/rw.c b/drivers/infiniband/core/rw.c
index 5a3092abb4e6..fc45c384833f 100644
--- a/drivers/infiniband/core/rw.c
+++ b/drivers/infiniband/core/rw.c
@@ -213,8 +213,7 @@ static int rdma_rw_init_mr_wrs_bvec(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
int i, ret, count = 0;
u32 nents = 0;
- ctx->reg = kzalloc_objs(*ctx->reg, DIV_ROUND_UP(nr_bvec, pages_per_mr),
- GFP_KERNEL);
+ ctx->reg = kzalloc_objs(*ctx->reg, DIV_ROUND_UP(nr_bvec, pages_per_mr));
if (!ctx->reg)
return -ENOMEM;
@@ -222,8 +221,7 @@ static int rdma_rw_init_mr_wrs_bvec(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
* Build scatterlist from bvecs using the iterator. This follows
* the pattern from __blk_rq_map_sg.
*/
- ctx->reg[0].sgt.sgl = kmalloc_objs(*ctx->reg[0].sgt.sgl, nr_bvec,
- GFP_KERNEL);
+ ctx->reg[0].sgt.sgl = kmalloc_objs(*ctx->reg[0].sgt.sgl, nr_bvec);
if (!ctx->reg[0].sgt.sgl) {
ret = -ENOMEM;
goto out_free_reg;
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
index dbd452efe7aa..c6c295f5b783 100644
--- a/drivers/infiniband/core/sa_query.c
+++ b/drivers/infiniband/core/sa_query.c
@@ -2414,8 +2414,7 @@ static int ib_sa_add_one(struct ib_device *device)
s = rdma_start_port(device);
e = rdma_end_port(device);
- sa_dev = kzalloc_flex(*sa_dev, port, size_add(size_sub(e, s), 1),
- GFP_KERNEL);
+ sa_dev = kzalloc_flex(*sa_dev, port, size_add(size_sub(e, s), 1));
if (!sa_dev)
return -ENOMEM;
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index d55f6a98c456..7f565613b5cf 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -855,8 +855,7 @@ alloc_hw_stats_device(struct ib_device *ibdev)
* Two extra attribue elements here, one for the lifespan entry and
* one to NULL terminate the list for the sysfs core code
*/
- data = kzalloc_flex(*data, attrs, size_add(stats->num_counters, 1),
- GFP_KERNEL);
+ data = kzalloc_flex(*data, attrs, size_add(stats->num_counters, 1));
if (!data)
goto err_free_stats;
data->group.attrs = kzalloc_objs(*data->group.attrs,
@@ -962,12 +961,10 @@ alloc_hw_stats_port(struct ib_port *port, struct attribute_group *group)
* Two extra attribue elements here, one for the lifespan entry and
* one to NULL terminate the list for the sysfs core code
*/
- data = kzalloc_flex(*data, attrs, size_add(stats->num_counters, 1),
- GFP_KERNEL);
+ data = kzalloc_flex(*data, attrs, size_add(stats->num_counters, 1));
if (!data)
goto err_free_stats;
- group->attrs = kzalloc_objs(*group->attrs, stats->num_counters + 2,
- GFP_KERNEL);
+ group->attrs = kzalloc_objs(*group->attrs, stats->num_counters + 2);
if (!group->attrs)
goto err_free_data;
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
index d9991d1f6e9a..c3ef9f85c7eb 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -1396,8 +1396,7 @@ static int ib_umad_add_one(struct ib_device *device)
s = rdma_start_port(device);
e = rdma_end_port(device);
- umad_dev = kzalloc_flex(*umad_dev, ports, size_add(size_sub(e, s), 1),
- GFP_KERNEL);
+ umad_dev = kzalloc_flex(*umad_dev, ports, size_add(size_sub(e, s), 1));
if (!umad_dev)
return -ENOMEM;
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 02abeed9c75d..758ed4ae5f7a 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -3292,8 +3292,7 @@ static int ib_uverbs_ex_create_flow(struct uverbs_attr_bundle *attrs)
goto err_put;
}
- flow_attr = kzalloc_flex(*flow_attr, flows, cmd.flow_attr.num_of_specs,
- GFP_KERNEL);
+ flow_attr = kzalloc_flex(*flow_attr, flows, cmd.flow_attr.num_of_specs);
if (!flow_attr) {
err = -ENOMEM;
goto err_put;
diff --git a/drivers/infiniband/hw/bng_re/bng_fw.c b/drivers/infiniband/hw/bng_re/bng_fw.c
index cd2d2670700d..17d7cc3aa11d 100644
--- a/drivers/infiniband/hw/bng_re/bng_fw.c
+++ b/drivers/infiniband/hw/bng_re/bng_fw.c
@@ -98,8 +98,7 @@ int bng_re_alloc_fw_channel(struct bng_re_res *res,
goto fail;
}
- rcfw->crsqe_tbl = kzalloc_objs(*rcfw->crsqe_tbl, cmdq->hwq.max_elements,
- GFP_KERNEL);
+ rcfw->crsqe_tbl = kzalloc_objs(*rcfw->crsqe_tbl, cmdq->hwq.max_elements);
if (!rcfw->crsqe_tbl)
goto fail;
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 312d8856adb4..5c5ecfacf506 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -1547,8 +1547,7 @@ static int bnxt_re_create_shadow_gsi(struct bnxt_re_qp *qp,
rdev = qp->rdev;
/* Create a shadow QP to handle the QP1 traffic */
- sqp_tbl = kzalloc_objs(*sqp_tbl, BNXT_RE_MAX_GSI_SQP_ENTRIES,
- GFP_KERNEL);
+ sqp_tbl = kzalloc_objs(*sqp_tbl, BNXT_RE_MAX_GSI_SQP_ENTRIES);
if (!sqp_tbl)
return -ENOMEM;
rdev->gsi_ctx.sqp_tbl = sqp_tbl;
@@ -3194,8 +3193,7 @@ int bnxt_re_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
cq->qplib_cq.dpi = &uctx->dpi;
} else {
cq->max_cql = min_t(u32, entries, MAX_CQL_PER_POLL);
- cq->cql = kzalloc_objs(struct bnxt_qplib_cqe, cq->max_cql,
- GFP_KERNEL);
+ cq->cql = kzalloc_objs(struct bnxt_qplib_cqe, cq->max_cql);
if (!cq->cql) {
rc = -ENOMEM;
goto fail;
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
index 5a7cc3b1987e..2d7932b3c492 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
@@ -688,8 +688,7 @@ int bnxt_qplib_create_srq(struct bnxt_qplib_res *res,
srq->start_idx = 0;
srq->last_idx = srq->hwq.max_elements - 1;
if (!srq->hwq.is_user) {
- srq->swq = kzalloc_objs(*srq->swq, srq->hwq.max_elements,
- GFP_KERNEL);
+ srq->swq = kzalloc_objs(*srq->swq, srq->hwq.max_elements);
if (!srq->swq) {
rc = -ENOMEM;
goto fail;
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
index 4ba87b0ed62f..9ee0d500436c 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
@@ -968,8 +968,7 @@ int bnxt_qplib_alloc_rcfw_channel(struct bnxt_qplib_res *res,
goto fail;
}
- rcfw->crsqe_tbl = kzalloc_objs(*rcfw->crsqe_tbl, cmdq->hwq.max_elements,
- GFP_KERNEL);
+ rcfw->crsqe_tbl = kzalloc_objs(*rcfw->crsqe_tbl, cmdq->hwq.max_elements);
if (!rcfw->crsqe_tbl)
goto fail;
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 1b9104d41b55..0a2d9eb72511 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -223,16 +223,14 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
}
if (!user) {
- wq->sq.sw_sq = kzalloc_objs(*wq->sq.sw_sq, wq->sq.size,
- GFP_KERNEL);
+ wq->sq.sw_sq = kzalloc_objs(*wq->sq.sw_sq, wq->sq.size);
if (!wq->sq.sw_sq) {
ret = -ENOMEM;
goto free_rq_qid;//FIXME
}
if (need_rq) {
- wq->rq.sw_rq = kzalloc_objs(*wq->rq.sw_rq, wq->rq.size,
- GFP_KERNEL);
+ wq->rq.sw_rq = kzalloc_objs(*wq->rq.sw_rq, wq->rq.size);
if (!wq->rq.sw_rq) {
ret = -ENOMEM;
goto free_sw_sq;
@@ -2246,8 +2244,7 @@ int c4iw_create_qp(struct ib_qp *qp, struct ib_qp_init_attr *attrs,
}
memset(&uresp, 0, sizeof(uresp));
if (t4_sq_onchip(&qhp->wq.sq)) {
- ma_sync_key_mm = kmalloc_obj(*ma_sync_key_mm,
- GFP_KERNEL);
+ ma_sync_key_mm = kmalloc_obj(*ma_sync_key_mm);
if (!ma_sync_key_mm) {
ret = -ENOMEM;
goto err_free_rq_db_key;
diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index 51130bac3974..b5b93b42e6c4 100644
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -1374,8 +1374,7 @@ static int pbl_chunk_list_create(struct efa_dev *dev, struct pbl_context *pbl)
chunk_list_size = DIV_ROUND_UP(page_cnt, EFA_PTRS_PER_CHUNK);
chunk_list->size = chunk_list_size;
- chunk_list->chunks = kzalloc_objs(*chunk_list->chunks, chunk_list_size,
- GFP_KERNEL);
+ chunk_list->chunks = kzalloc_objs(*chunk_list->chunks, chunk_list_size);
if (!chunk_list->chunks)
return -ENOMEM;
diff --git a/drivers/infiniband/hw/hfi1/pio.c b/drivers/infiniband/hw/hfi1/pio.c
index fdf7cecb8336..bc61a13c336a 100644
--- a/drivers/infiniband/hw/hfi1/pio.c
+++ b/drivers/infiniband/hw/hfi1/pio.c
@@ -1882,8 +1882,7 @@ int pio_map_init(struct hfi1_devdata *dd, u8 port, u8 num_vls, u8 *vl_scontexts)
vl_scontexts[i] = sc_per_vl + (extra > 0 ? 1 : 0);
}
/* build new map */
- newmap = kzalloc_flex(*newmap, map, roundup_pow_of_two(num_vls),
- GFP_KERNEL);
+ newmap = kzalloc_flex(*newmap, map, roundup_pow_of_two(num_vls));
if (!newmap)
goto bail;
newmap->actual_vls = num_vls;
@@ -1897,8 +1896,7 @@ int pio_map_init(struct hfi1_devdata *dd, u8 port, u8 num_vls, u8 *vl_scontexts)
int sz = roundup_pow_of_two(vl_scontexts[i]);
/* only allocate once */
- newmap->map[i] = kzalloc_flex(*newmap->map[i], ksc, sz,
- GFP_KERNEL);
+ newmap->map[i] = kzalloc_flex(*newmap->map[i], ksc, sz);
if (!newmap->map[i])
goto bail;
newmap->map[i]->mask = (1 << ilog2(sz)) - 1;
diff --git a/drivers/infiniband/hw/hfi1/user_exp_rcv.c b/drivers/infiniband/hw/hfi1/user_exp_rcv.c
index 67ed1542aa8a..a092c92953de 100644
--- a/drivers/infiniband/hw/hfi1/user_exp_rcv.c
+++ b/drivers/infiniband/hw/hfi1/user_exp_rcv.c
@@ -52,8 +52,7 @@ int hfi1_user_exp_rcv_init(struct hfi1_filedata *fd,
{
int ret = 0;
- fd->entry_to_rb = kzalloc_objs(*fd->entry_to_rb, uctxt->expected_count,
- GFP_KERNEL);
+ fd->entry_to_rb = kzalloc_objs(*fd->entry_to_rb, uctxt->expected_count);
if (!fd->entry_to_rb)
return -ENOMEM;
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 1d2d0d8bdcdf..1148d732f94f 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -1153,8 +1153,7 @@ void hns_roce_handle_device_err(struct hns_roce_dev *hr_dev)
static int hns_roce_alloc_dfx_cnt(struct hns_roce_dev *hr_dev)
{
- hr_dev->dfx_cnt = kvzalloc_objs(atomic64_t, HNS_ROCE_DFX_CNT_TOTAL,
- GFP_KERNEL);
+ hr_dev->dfx_cnt = kvzalloc_objs(atomic64_t, HNS_ROCE_DFX_CNT_TOTAL);
if (!hr_dev->dfx_cnt)
return -ENOMEM;
diff --git a/drivers/infiniband/hw/ionic/ionic_admin.c b/drivers/infiniband/hw/ionic/ionic_admin.c
index 59f22e83c931..37e24450d129 100644
--- a/drivers/infiniband/hw/ionic/ionic_admin.c
+++ b/drivers/infiniband/hw/ionic/ionic_admin.c
@@ -1095,8 +1095,7 @@ int ionic_create_rdma_admin(struct ionic_ibdev *dev)
goto out;
}
- dev->eq_vec = kmalloc_objs(*dev->eq_vec, dev->lif_cfg.eq_count,
- GFP_KERNEL);
+ dev->eq_vec = kmalloc_objs(*dev->eq_vec, dev->lif_cfg.eq_count);
if (!dev->eq_vec) {
rc = -ENOMEM;
goto out;
@@ -1126,8 +1125,7 @@ int ionic_create_rdma_admin(struct ionic_ibdev *dev)
dev->lif_cfg.eq_count = eq_i;
- dev->aq_vec = kmalloc_objs(*dev->aq_vec, dev->lif_cfg.aq_count,
- GFP_KERNEL);
+ dev->aq_vec = kmalloc_objs(*dev->aq_vec, dev->lif_cfg.aq_count);
if (!dev->aq_vec) {
rc = -ENOMEM;
goto out;
diff --git a/drivers/infiniband/hw/ionic/ionic_controlpath.c b/drivers/infiniband/hw/ionic/ionic_controlpath.c
index 7889d76bf69d..5b3f40bd98d8 100644
--- a/drivers/infiniband/hw/ionic/ionic_controlpath.c
+++ b/drivers/infiniband/hw/ionic/ionic_controlpath.c
@@ -1868,8 +1868,7 @@ static int ionic_qp_sq_init(struct ionic_ibdev *dev, struct ionic_ctx *ctx,
ionic_queue_dbell_init(&qp->sq, qp->qpid);
- qp->sq_meta = kmalloc_objs(*qp->sq_meta, (u32)qp->sq.mask + 1,
- GFP_KERNEL);
+ qp->sq_meta = kmalloc_objs(*qp->sq_meta, (u32)qp->sq.mask + 1);
if (!qp->sq_meta) {
rc = -ENOMEM;
goto err_sq_meta;
@@ -2082,8 +2081,7 @@ static int ionic_qp_rq_init(struct ionic_ibdev *dev, struct ionic_ctx *ctx,
ionic_queue_dbell_init(&qp->rq, qp->qpid);
- qp->rq_meta = kmalloc_objs(*qp->rq_meta, (u32)qp->rq.mask + 1,
- GFP_KERNEL);
+ qp->rq_meta = kmalloc_objs(*qp->rq_meta, (u32)qp->rq.mask + 1);
if (!qp->rq_meta) {
rc = -ENOMEM;
goto err_rq_meta;
diff --git a/drivers/infiniband/hw/ionic/ionic_hw_stats.c b/drivers/infiniband/hw/ionic/ionic_hw_stats.c
index 03fdd2b16c4e..f72c9837e135 100644
--- a/drivers/infiniband/hw/ionic/ionic_hw_stats.c
+++ b/drivers/infiniband/hw/ionic/ionic_hw_stats.c
@@ -155,8 +155,7 @@ static int ionic_init_hw_stats(struct ionic_ibdev *dev)
dev->hw_stats_count = hw_stats_count;
/* alloc and init array of names, for alloc_hw_stats */
- dev->hw_stats_hdrs = kzalloc_objs(*dev->hw_stats_hdrs, hw_stats_count,
- GFP_KERNEL);
+ dev->hw_stats_hdrs = kzalloc_objs(*dev->hw_stats_hdrs, hw_stats_count);
if (!dev->hw_stats_hdrs) {
rc = -ENOMEM;
goto err_dma;
@@ -401,8 +400,7 @@ static int ionic_alloc_counters(struct ionic_ibdev *dev)
cs->queue_stats_count = hw_stats_count;
/* alloc and init array of names */
- cs->stats_hdrs = kzalloc_objs(*cs->stats_hdrs, hw_stats_count,
- GFP_KERNEL);
+ cs->stats_hdrs = kzalloc_objs(*cs->stats_hdrs, hw_stats_count);
if (!cs->stats_hdrs) {
rc = -ENOMEM;
goto err_dma;
@@ -448,8 +446,7 @@ void ionic_stats_init(struct ionic_ibdev *dev)
}
if (stats_type & IONIC_LIF_RDMA_STAT_QP) {
- dev->counter_stats = kzalloc_obj(*dev->counter_stats,
- GFP_KERNEL);
+ dev->counter_stats = kzalloc_obj(*dev->counter_stats);
if (!dev->counter_stats)
return;
diff --git a/drivers/infiniband/hw/irdma/cm.c b/drivers/infiniband/hw/irdma/cm.c
index 3627797c6272..3d084d4ff577 100644
--- a/drivers/infiniband/hw/irdma/cm.c
+++ b/drivers/infiniband/hw/irdma/cm.c
@@ -1683,8 +1683,7 @@ static int irdma_add_mqh_6(struct irdma_device *iwdev,
ibdev_dbg(&iwdev->ibdev, "CM: IP=%pI6, vlan_id=%d, MAC=%pM\n",
&ifp->addr, rdma_vlan_dev_vlan_id(ip_dev),
ip_dev->dev_addr);
- child_listen_node = kzalloc_obj(*child_listen_node,
- GFP_KERNEL);
+ child_listen_node = kzalloc_obj(*child_listen_node);
ibdev_dbg(&iwdev->ibdev, "CM: Allocating child listener %p\n",
child_listen_node);
if (!child_listen_node) {
@@ -1772,8 +1771,7 @@ static int irdma_add_mqh_4(struct irdma_device *iwdev,
"CM: Allocating child CM Listener forIP=%pI4, vlan_id=%d, MAC=%pM\n",
&ifa->ifa_address, rdma_vlan_dev_vlan_id(ip_dev),
ip_dev->dev_addr);
- child_listen_node = kzalloc_obj(*child_listen_node,
- GFP_KERNEL);
+ child_listen_node = kzalloc_obj(*child_listen_node);
cm_parent_listen_node->cm_core->stats_listen_nodes_created++;
ibdev_dbg(&iwdev->ibdev, "CM: Allocating child listener %p\n",
child_listen_node);
diff --git a/drivers/infiniband/hw/irdma/icrdma_if.c b/drivers/infiniband/hw/irdma/icrdma_if.c
index 53c60543d748..2172a2092e3f 100644
--- a/drivers/infiniband/hw/irdma/icrdma_if.c
+++ b/drivers/infiniband/hw/irdma/icrdma_if.c
@@ -167,8 +167,7 @@ static int icrdma_init_interrupts(struct irdma_pci_f *rf, struct iidc_rdma_core_
int i;
rf->msix_count = num_online_cpus() + IRDMA_NUM_AEQ_MSIX;
- rf->msix_entries = kzalloc_objs(*rf->msix_entries, rf->msix_count,
- GFP_KERNEL);
+ rf->msix_entries = kzalloc_objs(*rf->msix_entries, rf->msix_count);
if (!rf->msix_entries)
return -ENOMEM;
diff --git a/drivers/infiniband/hw/irdma/ig3rdma_if.c b/drivers/infiniband/hw/irdma/ig3rdma_if.c
index 4035f58efa31..b3e49e5bef10 100644
--- a/drivers/infiniband/hw/irdma/ig3rdma_if.c
+++ b/drivers/infiniband/hw/irdma/ig3rdma_if.c
@@ -101,8 +101,7 @@ static int ig3rdma_cfg_regions(struct irdma_hw *hw,
return -ENOMEM;
hw->num_io_regions = le16_to_cpu(idc_priv->num_memory_regions);
- hw->io_regs = kzalloc_objs(struct irdma_mmio_region, hw->num_io_regions,
- GFP_KERNEL);
+ hw->io_regs = kzalloc_objs(struct irdma_mmio_region, hw->num_io_regions);
if (!hw->io_regs) {
iounmap(hw->rdma_reg.addr);
diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index 2702825ccb8d..15af53237217 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -709,14 +709,12 @@ static int irdma_setup_kmode_qp(struct irdma_device *iwdev,
return status;
iwqp->kqp.sq_wrid_mem =
- kzalloc_objs(*iwqp->kqp.sq_wrid_mem, ukinfo->sq_depth,
- GFP_KERNEL);
+ kzalloc_objs(*iwqp->kqp.sq_wrid_mem, ukinfo->sq_depth);
if (!iwqp->kqp.sq_wrid_mem)
return -ENOMEM;
iwqp->kqp.rq_wrid_mem =
- kzalloc_objs(*iwqp->kqp.rq_wrid_mem, ukinfo->rq_depth,
- GFP_KERNEL);
+ kzalloc_objs(*iwqp->kqp.rq_wrid_mem, ukinfo->rq_depth);
if (!iwqp->kqp.rq_wrid_mem) {
kfree(iwqp->kqp.sq_wrid_mem);
diff --git a/drivers/infiniband/hw/mlx4/alias_GUID.c b/drivers/infiniband/hw/mlx4/alias_GUID.c
index e4c539dd2359..c6e1b9e4122a 100644
--- a/drivers/infiniband/hw/mlx4/alias_GUID.c
+++ b/drivers/infiniband/hw/mlx4/alias_GUID.c
@@ -835,8 +835,7 @@ int mlx4_ib_init_alias_guid_service(struct mlx4_ib_dev *dev)
if (!mlx4_is_master(dev->dev))
return 0;
- dev->sriov.alias_guid.sa_client = kzalloc_obj(*dev->sriov.alias_guid.sa_client,
- GFP_KERNEL);
+ dev->sriov.alias_guid.sa_client = kzalloc_obj(*dev->sriov.alias_guid.sa_client);
if (!dev->sriov.alias_guid.sa_client)
return -ENOMEM;
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
index 723389353116..e5e7ecd14284 100644
--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
@@ -1616,8 +1616,7 @@ static int mlx4_ib_alloc_pv_bufs(struct mlx4_ib_demux_pv_ctx *ctx,
if (!tun_qp->ring)
return -ENOMEM;
- tun_qp->tx_ring = kzalloc_objs(struct mlx4_ib_tun_tx_buf, nmbr_bufs,
- GFP_KERNEL);
+ tun_qp->tx_ring = kzalloc_objs(struct mlx4_ib_tun_tx_buf, nmbr_bufs);
if (!tun_qp->tx_ring) {
kfree(tun_qp->ring);
tun_qp->ring = NULL;
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index 1109eac52890..6ee12aab1259 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -2748,8 +2748,7 @@ static int mlx4_ib_probe(struct auxiliary_device *adev,
if (mlx4_is_bonded(dev))
for (i = 1; i < ibdev->num_ports ; ++i) {
new_counter_index =
- kmalloc_obj(struct counter_index,
- GFP_KERNEL);
+ kmalloc_obj(struct counter_index);
if (!new_counter_index) {
err = -ENOMEM;
goto err_counter;
diff --git a/drivers/infiniband/hw/mlx4/sysfs.c b/drivers/infiniband/hw/mlx4/sysfs.c
index cd9163c5c872..b8fa4ecfc961 100644
--- a/drivers/infiniband/hw/mlx4/sysfs.c
+++ b/drivers/infiniband/hw/mlx4/sysfs.c
@@ -244,8 +244,7 @@ static int add_port_entries(struct mlx4_ib_dev *device, int port_num)
* gids (operational)
* mcg_table
*/
- port->dentr_ar = kzalloc_obj(struct mlx4_ib_iov_sysfs_attr_ar,
- GFP_KERNEL);
+ port->dentr_ar = kzalloc_obj(struct mlx4_ib_iov_sysfs_attr_ar);
if (!port->dentr_ar) {
ret = -ENOMEM;
goto err;
diff --git a/drivers/infiniband/hw/mlx5/counters.c b/drivers/infiniband/hw/mlx5/counters.c
index d1ad88908634..5b4482dd6274 100644
--- a/drivers/infiniband/hw/mlx5/counters.c
+++ b/drivers/infiniband/hw/mlx5/counters.c
@@ -858,8 +858,7 @@ static int __mlx5_ib_alloc_counters(struct mlx5_ib_dev *dev,
skip_non_qcounters:
cnts->num_op_counters = num_op_counters;
num_counters += num_op_counters;
- cnts->descs = kzalloc_objs(struct rdma_stat_desc, num_counters,
- GFP_KERNEL);
+ cnts->descs = kzalloc_objs(struct rdma_stat_desc, num_counters);
if (!cnts->descs)
return -ENOMEM;
@@ -1073,8 +1072,7 @@ int mlx5_ib_flow_counters_set_data(struct ib_counters *ibcounters,
if (cntrs_data->ncounters > MAX_COUNTERS_NUM)
return -EINVAL;
- desc_data = kzalloc_objs(*desc_data, cntrs_data->ncounters,
- GFP_KERNEL);
+ desc_data = kzalloc_objs(*desc_data, cntrs_data->ncounters);
if (!desc_data)
return -ENOMEM;
diff --git a/drivers/infiniband/hw/mlx5/fs.c b/drivers/infiniband/hw/mlx5/fs.c
index 2b4de32ad600..cbccb0b9ac10 100644
--- a/drivers/infiniband/hw/mlx5/fs.c
+++ b/drivers/infiniband/hw/mlx5/fs.c
@@ -3486,16 +3486,14 @@ int mlx5_ib_fs_init(struct mlx5_ib_dev *dev)
for (i = 0; i < MLX5_RDMA_TRANSPORT_BYPASS_PRIO; i++) {
dev->flow_db->rdma_transport_rx[i] =
- kzalloc_objs(struct mlx5_ib_flow_prio, dev->num_ports,
- GFP_KERNEL);
+ kzalloc_objs(struct mlx5_ib_flow_prio, dev->num_ports);
if (!dev->flow_db->rdma_transport_rx[i])
goto free_rdma_transport_rx;
}
for (j = 0; j < MLX5_RDMA_TRANSPORT_BYPASS_PRIO; j++) {
dev->flow_db->rdma_transport_tx[j] =
- kzalloc_objs(struct mlx5_ib_flow_prio, dev->num_ports,
- GFP_KERNEL);
+ kzalloc_objs(struct mlx5_ib_flow_prio, dev->num_ports);
if (!dev->flow_db->rdma_transport_tx[j])
goto free_rdma_transport_tx;
}
diff --git a/drivers/infiniband/hw/mlx5/gsi.c b/drivers/infiniband/hw/mlx5/gsi.c
index ee7463815e77..b2e2a219639d 100644
--- a/drivers/infiniband/hw/mlx5/gsi.c
+++ b/drivers/infiniband/hw/mlx5/gsi.c
@@ -109,8 +109,7 @@ int mlx5_ib_create_gsi(struct ib_pd *pd, struct mlx5_ib_qp *mqp,
return -ENOMEM;
gsi->outstanding_wrs =
- kzalloc_objs(*gsi->outstanding_wrs, attr->cap.max_send_wr,
- GFP_KERNEL);
+ kzalloc_objs(*gsi->outstanding_wrs, attr->cap.max_send_wr);
if (!gsi->outstanding_wrs) {
ret = -ENOMEM;
goto err_free_tx;
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index 16b48377f825..665323b90b64 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -276,8 +276,7 @@ static int add_keys(struct mlx5_cache_ent *ent, unsigned int num)
int i;
for (i = 0; i < num; i++) {
- async_create = kzalloc_obj(struct mlx5r_async_create_mkey,
- GFP_KERNEL);
+ async_create = kzalloc_obj(struct mlx5r_async_create_mkey);
if (!async_create)
return -ENOMEM;
mkc = MLX5_ADDR_OF(create_mkey_in, async_create->in,
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index ccb59ac9860c..47de8cc9937e 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1185,8 +1185,7 @@ static int _create_kernel_qp(struct mlx5_ib_dev *dev,
sizeof(*qp->sq.wr_data), GFP_KERNEL);
qp->rq.wrid = kvmalloc_array(qp->rq.wqe_cnt,
sizeof(*qp->rq.wrid), GFP_KERNEL);
- qp->sq.w_list = kvmalloc_objs(*qp->sq.w_list, qp->sq.wqe_cnt,
- GFP_KERNEL);
+ qp->sq.w_list = kvmalloc_objs(*qp->sq.w_list, qp->sq.wqe_cnt);
qp->sq.wqe_head = kvmalloc_array(qp->sq.wqe_cnt,
sizeof(*qp->sq.wqe_head), GFP_KERNEL);
diff --git a/drivers/infiniband/hw/mthca/mthca_allocator.c b/drivers/infiniband/hw/mthca/mthca_allocator.c
index 005902d47eb6..dedc301235a0 100644
--- a/drivers/infiniband/hw/mthca/mthca_allocator.c
+++ b/drivers/infiniband/hw/mthca/mthca_allocator.c
@@ -230,8 +230,7 @@ int mthca_buf_alloc(struct mthca_dev *dev, int size, int max_direct,
if (!dma_list)
return -ENOMEM;
- buf->page_list = kmalloc_objs(*buf->page_list, npages,
- GFP_KERNEL);
+ buf->page_list = kmalloc_objs(*buf->page_list, npages);
if (!buf->page_list)
goto err_out;
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c
index 38a2fecf33f8..bca908054e1b 100644
--- a/drivers/infiniband/hw/mthca/mthca_mr.c
+++ b/drivers/infiniband/hw/mthca/mthca_mr.c
@@ -146,8 +146,7 @@ static int mthca_buddy_init(struct mthca_buddy *buddy, int max_order)
buddy->bits = kcalloc(buddy->max_order + 1, sizeof(*buddy->bits),
GFP_KERNEL);
- buddy->num_free = kzalloc_objs(*buddy->num_free, (buddy->max_order + 1),
- GFP_KERNEL);
+ buddy->num_free = kzalloc_objs(*buddy->num_free, (buddy->max_order + 1));
if (!buddy->bits || !buddy->num_free)
goto err_out;
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
index 3a88103c1fc4..b62a9bf160c5 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c
@@ -219,14 +219,12 @@ static int ocrdma_register_device(struct ocrdma_dev *dev)
static int ocrdma_alloc_resources(struct ocrdma_dev *dev)
{
mutex_init(&dev->dev_lock);
- dev->cq_tbl = kzalloc_objs(struct ocrdma_cq *, OCRDMA_MAX_CQ,
- GFP_KERNEL);
+ dev->cq_tbl = kzalloc_objs(struct ocrdma_cq *, OCRDMA_MAX_CQ);
if (!dev->cq_tbl)
goto alloc_err;
if (dev->attr.max_qp) {
- dev->qp_tbl = kzalloc_objs(struct ocrdma_qp *, OCRDMA_MAX_QP,
- GFP_KERNEL);
+ dev->qp_tbl = kzalloc_objs(struct ocrdma_qp *, OCRDMA_MAX_QP);
if (!dev->qp_tbl)
goto alloc_err;
}
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 4498ef7810ff..e89be2fbd5eb 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -794,8 +794,7 @@ static int ocrdma_build_pbl_tbl(struct ocrdma_dev *dev, struct ocrdma_hw_mr *mr)
void *va;
dma_addr_t pa;
- mr->pbl_table = kzalloc_objs(struct ocrdma_pbl, mr->num_pbls,
- GFP_KERNEL);
+ mr->pbl_table = kzalloc_objs(struct ocrdma_pbl, mr->num_pbls);
if (!mr->pbl_table)
return -ENOMEM;
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
index 81970a53a049..f27c28d934ae 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
@@ -257,14 +257,12 @@ static int pvrdma_register_device(struct pvrdma_dev *dev)
mutex_init(&dev->port_mutex);
spin_lock_init(&dev->desc_lock);
- dev->cq_tbl = kzalloc_objs(struct pvrdma_cq *, dev->dsr->caps.max_cq,
- GFP_KERNEL);
+ dev->cq_tbl = kzalloc_objs(struct pvrdma_cq *, dev->dsr->caps.max_cq);
if (!dev->cq_tbl)
return ret;
spin_lock_init(&dev->cq_tbl_lock);
- dev->qp_tbl = kzalloc_objs(struct pvrdma_qp *, dev->dsr->caps.max_qp,
- GFP_KERNEL);
+ dev->qp_tbl = kzalloc_objs(struct pvrdma_qp *, dev->dsr->caps.max_qp);
if (!dev->qp_tbl)
goto err_cq_free;
spin_lock_init(&dev->qp_tbl_lock);
@@ -984,8 +982,7 @@ static int pvrdma_pci_probe(struct pci_dev *pdev,
}
/* Allocate GID table */
- dev->sgid_tbl = kzalloc_objs(union ib_gid, dev->dsr->caps.gid_tbl_len,
- GFP_KERNEL);
+ dev->sgid_tbl = kzalloc_objs(union ib_gid, dev->dsr->caps.gid_tbl_len);
if (!dev->sgid_tbl) {
ret = -ENOMEM;
goto err_free_uar_table;
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index fb8e70eae383..402671567736 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1773,8 +1773,7 @@ static int ipoib_dev_init_default(struct net_device *dev)
ipoib_napi_add(dev);
/* Allocate RX/TX "rings" to hold queued skbs */
- priv->rx_ring = kzalloc_objs(*priv->rx_ring, ipoib_recvq_size,
- GFP_KERNEL);
+ priv->rx_ring = kzalloc_objs(*priv->rx_ring, ipoib_recvq_size);
if (!priv->rx_ring)
goto out;
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 84de723cacb4..233adb1fe9ac 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -332,8 +332,7 @@ isert_alloc_login_buf(struct isert_conn *isert_conn,
{
int ret;
- isert_conn->login_desc = kzalloc_obj(*isert_conn->login_desc,
- GFP_KERNEL);
+ isert_conn->login_desc = kzalloc_obj(*isert_conn->login_desc);
if (!isert_conn->login_desc)
return -ENOMEM;
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index c0cd2592dd93..f1c3b4d14324 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -1364,8 +1364,7 @@ static int alloc_path_reqs(struct rtrs_clt_path *clt_path)
enum ib_mr_type mr_type;
int i, err = -ENOMEM;
- clt_path->reqs = kzalloc_objs(*clt_path->reqs, clt_path->queue_depth,
- GFP_KERNEL);
+ clt_path->reqs = kzalloc_objs(*clt_path->reqs, clt_path->queue_depth);
if (!clt_path->reqs)
return -ENOMEM;
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
index 59c8f72b0b34..0140bfaed721 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c
@@ -138,8 +138,7 @@ static int rtrs_srv_alloc_ops_ids(struct rtrs_srv_path *srv_path)
struct rtrs_srv_op *id;
int i, ret;
- srv_path->ops_ids = kzalloc_objs(*srv_path->ops_ids, srv->queue_depth,
- GFP_KERNEL);
+ srv_path->ops_ids = kzalloc_objs(*srv_path->ops_ids, srv->queue_depth);
if (!srv_path->ops_ids)
goto err;
@@ -1820,8 +1819,7 @@ static struct rtrs_srv_path *__alloc_path(struct rtrs_srv_sess *srv,
srv_path->stats->srv_path = srv_path;
- srv_path->dma_addr = kzalloc_objs(*srv_path->dma_addr, srv->queue_depth,
- GFP_KERNEL);
+ srv_path->dma_addr = kzalloc_objs(*srv_path->dma_addr, srv->queue_depth);
if (!srv_path->dma_addr)
goto err_free_percpu;
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index d90d288b0cad..e00b87acf481 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -965,8 +965,7 @@ static int srpt_alloc_rw_ctxs(struct srpt_send_ioctx *ioctx,
if (nbufs == 1) {
ioctx->rw_ctxs = &ioctx->s_rw_ctx;
} else {
- ioctx->rw_ctxs = kmalloc_objs(*ioctx->rw_ctxs, nbufs,
- GFP_KERNEL);
+ ioctx->rw_ctxs = kmalloc_objs(*ioctx->rw_ctxs, nbufs);
if (!ioctx->rw_ctxs)
return -ENOMEM;
}