diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/infiniband/ulp/rtrs | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip | |
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using
git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'
to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/infiniband/ulp/rtrs')
| -rw-r--r-- | drivers/infiniband/ulp/rtrs/rtrs-clt.c | 12 | ||||
| -rw-r--r-- | drivers/infiniband/ulp/rtrs/rtrs-srv.c | 20 | ||||
| -rw-r--r-- | drivers/infiniband/ulp/rtrs/rtrs.c | 2 |
3 files changed, 17 insertions, 17 deletions
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c index 67405a19ea10..c0cd2592dd93 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c @@ -1383,7 +1383,7 @@ static int alloc_path_reqs(struct rtrs_clt_path *clt_path) if (!req->iu) goto out; - req->sge = kzalloc_objs(*req->sge, 2, GFP_KERNEL); + req->sge = kzalloc_objs(*req->sge, 2); if (!req->sge) goto out; @@ -1537,7 +1537,7 @@ static struct rtrs_clt_path *alloc_path(struct rtrs_clt_sess *clt, int cpu; size_t total_con; - clt_path = kzalloc_obj(*clt_path, GFP_KERNEL); + clt_path = kzalloc_obj(*clt_path); if (!clt_path) goto err; @@ -1546,14 +1546,14 @@ static struct rtrs_clt_path *alloc_path(struct rtrs_clt_sess *clt, * +1: Extra connection for user messages */ total_con = con_num + nr_poll_queues + 1; - clt_path->s.con = kzalloc_objs(*clt_path->s.con, total_con, GFP_KERNEL); + clt_path->s.con = kzalloc_objs(*clt_path->s.con, total_con); if (!clt_path->s.con) goto err_free_path; clt_path->s.con_num = total_con; clt_path->s.irq_con_num = con_num + 1; - clt_path->stats = kzalloc_obj(*clt_path->stats, GFP_KERNEL); + clt_path->stats = kzalloc_obj(*clt_path->stats); if (!clt_path->stats) goto err_free_con; @@ -1620,7 +1620,7 @@ static int create_con(struct rtrs_clt_path *clt_path, unsigned int cid) { struct rtrs_clt_con *con; - con = kzalloc_obj(*con, GFP_KERNEL); + con = kzalloc_obj(*con); if (!con) return -ENOMEM; @@ -2727,7 +2727,7 @@ static struct rtrs_clt_sess *alloc_clt(const char *sessname, size_t paths_num, if (strlen(sessname) >= sizeof(clt->sessname)) return ERR_PTR(-EINVAL); - clt = kzalloc_obj(*clt, GFP_KERNEL); + clt = kzalloc_obj(*clt); if (!clt) return ERR_PTR(-ENOMEM); diff --git a/drivers/infiniband/ulp/rtrs/rtrs-srv.c b/drivers/infiniband/ulp/rtrs/rtrs-srv.c index c66929b74805..59c8f72b0b34 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs-srv.c +++ b/drivers/infiniband/ulp/rtrs/rtrs-srv.c @@ -144,7 +144,7 @@ static int rtrs_srv_alloc_ops_ids(struct rtrs_srv_path *srv_path) goto err; for (i = 0; i < srv->queue_depth; ++i) { - id = kzalloc_obj(*id, GFP_KERNEL); + id = kzalloc_obj(*id); if (!id) goto err; @@ -588,7 +588,7 @@ static int map_cont_bufs(struct rtrs_srv_path *srv_path) chunks_per_mr = DIV_ROUND_UP(srv->queue_depth, mrs_num); } - srv_path->mrs = kzalloc_objs(*srv_path->mrs, mrs_num, GFP_KERNEL); + srv_path->mrs = kzalloc_objs(*srv_path->mrs, mrs_num); if (!srv_path->mrs) return -ENOMEM; @@ -836,7 +836,7 @@ static int process_info_req(struct rtrs_srv_con *con, strscpy(srv_path->s.sessname, msg->pathname, sizeof(srv_path->s.sessname)); - rwr = kzalloc_objs(*rwr, srv_path->mrs_num, GFP_KERNEL); + rwr = kzalloc_objs(*rwr, srv_path->mrs_num); if (!rwr) return -ENOMEM; @@ -1435,7 +1435,7 @@ static struct rtrs_srv_sess *get_or_create_srv(struct rtrs_srv_ctx *ctx, } /* need to allocate a new srv */ - srv = kzalloc_obj(*srv, GFP_KERNEL); + srv = kzalloc_obj(*srv); if (!srv) return ERR_PTR(-ENOMEM); @@ -1448,7 +1448,7 @@ static struct rtrs_srv_sess *get_or_create_srv(struct rtrs_srv_ctx *ctx, device_initialize(&srv->dev); srv->dev.release = rtrs_srv_dev_release; - srv->chunks = kzalloc_objs(*srv->chunks, srv->queue_depth, GFP_KERNEL); + srv->chunks = kzalloc_objs(*srv->chunks, srv->queue_depth); if (!srv->chunks) goto err_free_srv; @@ -1713,7 +1713,7 @@ static int create_con(struct rtrs_srv_path *srv_path, u32 cq_num, max_send_wr, max_recv_wr, wr_limit; int err, cq_vector; - con = kzalloc_obj(*con, GFP_KERNEL); + con = kzalloc_obj(*con); if (!con) { err = -ENOMEM; goto err; @@ -1806,11 +1806,11 @@ static struct rtrs_srv_path *__alloc_path(struct rtrs_srv_sess *srv, err = -EEXIST; goto err; } - srv_path = kzalloc_obj(*srv_path, GFP_KERNEL); + srv_path = kzalloc_obj(*srv_path); if (!srv_path) goto err; - srv_path->stats = kzalloc_obj(*srv_path->stats, GFP_KERNEL); + srv_path->stats = kzalloc_obj(*srv_path->stats); if (!srv_path->stats) goto err_free_sess; @@ -1825,7 +1825,7 @@ static struct rtrs_srv_path *__alloc_path(struct rtrs_srv_sess *srv, if (!srv_path->dma_addr) goto err_free_percpu; - srv_path->s.con = kzalloc_objs(*srv_path->s.con, con_num, GFP_KERNEL); + srv_path->s.con = kzalloc_objs(*srv_path->s.con, con_num); if (!srv_path->s.con) goto err_free_dma_addr; @@ -2158,7 +2158,7 @@ static struct rtrs_srv_ctx *alloc_srv_ctx(struct rtrs_srv_ops *ops) { struct rtrs_srv_ctx *ctx; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return NULL; diff --git a/drivers/infiniband/ulp/rtrs/rtrs.c b/drivers/infiniband/ulp/rtrs/rtrs.c index f316cbe5e62c..a642626e0ecb 100644 --- a/drivers/infiniband/ulp/rtrs/rtrs.c +++ b/drivers/infiniband/ulp/rtrs/rtrs.c @@ -618,7 +618,7 @@ rtrs_ib_dev_find_or_add(struct ib_device *ib_dev, goto out_unlock; } mutex_unlock(&pool->mutex); - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) goto out_err; |
