summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/infiniband/sw
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlinux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
linux-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/sw')
-rw-r--r--drivers/infiniband/sw/rdmavt/mcast.c4
-rw-r--r--drivers/infiniband/sw/rdmavt/mr.c2
-rw-r--r--drivers/infiniband/sw/rdmavt/qp.c2
-rw-r--r--drivers/infiniband/sw/rdmavt/vt.c2
-rw-r--r--drivers/infiniband/sw/rxe/rxe_mcast.c4
-rw-r--r--drivers/infiniband/sw/rxe/rxe_mmap.c2
-rw-r--r--drivers/infiniband/sw/rxe/rxe_mr.c2
-rw-r--r--drivers/infiniband/sw/rxe/rxe_qp.c2
-rw-r--r--drivers/infiniband/sw/rxe/rxe_queue.c2
-rw-r--r--drivers/infiniband/sw/rxe/rxe_verbs.c6
-rw-r--r--drivers/infiniband/sw/siw/siw_cm.c6
-rw-r--r--drivers/infiniband/sw/siw/siw_main.c4
-rw-r--r--drivers/infiniband/sw/siw/siw_mem.c8
-rw-r--r--drivers/infiniband/sw/siw/siw_qp.c4
-rw-r--r--drivers/infiniband/sw/siw/siw_verbs.c8
15 files changed, 29 insertions, 29 deletions
diff --git a/drivers/infiniband/sw/rdmavt/mcast.c b/drivers/infiniband/sw/rdmavt/mcast.c
index 987e9c0b0466..1fda344d2056 100644
--- a/drivers/infiniband/sw/rdmavt/mcast.c
+++ b/drivers/infiniband/sw/rdmavt/mcast.c
@@ -34,7 +34,7 @@ static struct rvt_mcast_qp *rvt_mcast_qp_alloc(struct rvt_qp *qp)
{
struct rvt_mcast_qp *mqp;
- mqp = kmalloc_obj(*mqp, GFP_KERNEL);
+ mqp = kmalloc_obj(*mqp);
if (!mqp)
goto bail;
@@ -66,7 +66,7 @@ static struct rvt_mcast *rvt_mcast_alloc(union ib_gid *mgid, u16 lid)
{
struct rvt_mcast *mcast;
- mcast = kzalloc_obj(*mcast, GFP_KERNEL);
+ mcast = kzalloc_obj(*mcast);
if (!mcast)
goto bail;
diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
index 89b1c7410920..add3dde9488f 100644
--- a/drivers/infiniband/sw/rdmavt/mr.c
+++ b/drivers/infiniband/sw/rdmavt/mr.c
@@ -292,7 +292,7 @@ struct ib_mr *rvt_get_dma_mr(struct ib_pd *pd, int acc)
if (ibpd_to_rvtpd(pd)->user)
return ERR_PTR(-EPERM);
- mr = kzalloc_obj(*mr, GFP_KERNEL);
+ mr = kzalloc_obj(*mr);
if (!mr) {
ret = ERR_PTR(-ENOMEM);
goto bail;
diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c
index 8108660b2d33..c1199ea5d41f 100644
--- a/drivers/infiniband/sw/rdmavt/qp.c
+++ b/drivers/infiniband/sw/rdmavt/qp.c
@@ -2650,7 +2650,7 @@ struct rvt_qp_iter *rvt_qp_iter_init(struct rvt_dev_info *rdi,
{
struct rvt_qp_iter *i;
- i = kzalloc_obj(*i, GFP_KERNEL);
+ i = kzalloc_obj(*i);
if (!i)
return NULL;
diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c
index 3a7b1f3c4ac6..0c28b412d81a 100644
--- a/drivers/infiniband/sw/rdmavt/vt.c
+++ b/drivers/infiniband/sw/rdmavt/vt.c
@@ -53,7 +53,7 @@ struct rvt_dev_info *rvt_alloc_device(size_t size, int nports)
if (!rdi)
return rdi;
- rdi->ports = kzalloc_objs(*rdi->ports, nports, GFP_KERNEL);
+ rdi->ports = kzalloc_objs(*rdi->ports, nports);
if (!rdi->ports)
ib_dealloc_device(&rdi->ibdev);
diff --git a/drivers/infiniband/sw/rxe/rxe_mcast.c b/drivers/infiniband/sw/rxe/rxe_mcast.c
index 6c3c78ddedc9..5cad72073eca 100644
--- a/drivers/infiniband/sw/rxe/rxe_mcast.c
+++ b/drivers/infiniband/sw/rxe/rxe_mcast.c
@@ -223,7 +223,7 @@ static struct rxe_mcg *rxe_get_mcg(struct rxe_dev *rxe, union ib_gid *mgid)
}
/* speculative alloc of new mcg */
- mcg = kzalloc_obj(*mcg, GFP_KERNEL);
+ mcg = kzalloc_obj(*mcg);
if (!mcg) {
err = -ENOMEM;
goto err_dec;
@@ -363,7 +363,7 @@ static int rxe_attach_mcg(struct rxe_mcg *mcg, struct rxe_qp *qp)
spin_unlock_bh(&rxe->mcg_lock);
/* speculative alloc new mca without using GFP_ATOMIC */
- mca = kzalloc_obj(*mca, GFP_KERNEL);
+ mca = kzalloc_obj(*mca);
if (!mca)
return -ENOMEM;
diff --git a/drivers/infiniband/sw/rxe/rxe_mmap.c b/drivers/infiniband/sw/rxe/rxe_mmap.c
index 6afd158b4b0b..db380302149e 100644
--- a/drivers/infiniband/sw/rxe/rxe_mmap.c
+++ b/drivers/infiniband/sw/rxe/rxe_mmap.c
@@ -120,7 +120,7 @@ struct rxe_mmap_info *rxe_create_mmap_info(struct rxe_dev *rxe, u32 size,
if (!udata)
return ERR_PTR(-EINVAL);
- ip = kmalloc_obj(*ip, GFP_KERNEL);
+ ip = kmalloc_obj(*ip);
if (!ip)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
index e2a4eb72a56e..c696ff874980 100644
--- a/drivers/infiniband/sw/rxe/rxe_mr.c
+++ b/drivers/infiniband/sw/rxe/rxe_mr.c
@@ -156,7 +156,7 @@ static int rxe_mr_fill_pages_from_sgt(struct rxe_mr *mr, struct sg_table *sgt)
static int __alloc_mr_page_info(struct rxe_mr *mr, int num_pages)
{
- mr->page_info = kzalloc_objs(struct rxe_mr_page, num_pages, GFP_KERNEL);
+ mr->page_info = kzalloc_objs(struct rxe_mr_page, num_pages);
if (!mr->page_info)
return -ENOMEM;
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 3e00b1c3db0a..f3dff1aea96a 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -152,7 +152,7 @@ static int alloc_rd_atomic_resources(struct rxe_qp *qp, unsigned int n)
{
qp->resp.res_head = 0;
qp->resp.res_tail = 0;
- qp->resp.resources = kzalloc_objs(struct resp_res, n, GFP_KERNEL);
+ qp->resp.resources = kzalloc_objs(struct resp_res, n);
if (!qp->resp.resources)
return -ENOMEM;
diff --git a/drivers/infiniband/sw/rxe/rxe_queue.c b/drivers/infiniband/sw/rxe/rxe_queue.c
index e27d57ac687f..63a569d8df2b 100644
--- a/drivers/infiniband/sw/rxe/rxe_queue.c
+++ b/drivers/infiniband/sw/rxe/rxe_queue.c
@@ -63,7 +63,7 @@ struct rxe_queue *rxe_queue_init(struct rxe_dev *rxe, int *num_elem,
if (*num_elem < 0)
return NULL;
- q = kzalloc_obj(*q, GFP_KERNEL);
+ q = kzalloc_obj(*q);
if (!q)
return NULL;
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 5d1e0b3228c4..fe41362c5144 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -1245,7 +1245,7 @@ static struct ib_mr *rxe_get_dma_mr(struct ib_pd *ibpd, int access)
struct rxe_mr *mr;
int err;
- mr = kzalloc_obj(*mr, GFP_KERNEL);
+ mr = kzalloc_obj(*mr);
if (!mr)
return ERR_PTR(-ENOMEM);
@@ -1288,7 +1288,7 @@ static struct ib_mr *rxe_reg_user_mr(struct ib_pd *ibpd, u64 start,
return ERR_PTR(-EOPNOTSUPP);
}
- mr = kzalloc_obj(*mr, GFP_KERNEL);
+ mr = kzalloc_obj(*mr);
if (!mr)
return ERR_PTR(-ENOMEM);
@@ -1373,7 +1373,7 @@ static struct ib_mr *rxe_alloc_mr(struct ib_pd *ibpd, enum ib_mr_type mr_type,
goto err_out;
}
- mr = kzalloc_obj(*mr, GFP_KERNEL);
+ mr = kzalloc_obj(*mr);
if (!mr)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c
index 22fa54cacab9..f7ac81c0f267 100644
--- a/drivers/infiniband/sw/siw/siw_cm.c
+++ b/drivers/infiniband/sw/siw/siw_cm.c
@@ -205,7 +205,7 @@ static void siw_cep_socket_assoc(struct siw_cep *cep, struct socket *s)
static struct siw_cep *siw_cep_alloc(struct siw_device *sdev)
{
- struct siw_cep *cep = kzalloc_obj(*cep, GFP_KERNEL);
+ struct siw_cep *cep = kzalloc_obj(*cep);
unsigned long flags;
if (!cep)
@@ -334,7 +334,7 @@ static int siw_cm_alloc_work(struct siw_cep *cep, int num)
struct siw_cm_work *work;
while (num--) {
- work = kmalloc_obj(*work, GFP_KERNEL);
+ work = kmalloc_obj(*work);
if (!work) {
if (!(list_empty(&cep->work_freelist)))
siw_cm_free_work(cep);
@@ -1915,7 +1915,7 @@ int siw_create_listen(struct iw_cm_id *id, int backlog)
*/
if (!id->provider_data) {
id->provider_data =
- kmalloc_obj(struct list_head, GFP_KERNEL);
+ kmalloc_obj(struct list_head);
if (!id->provider_data) {
rv = -ENOMEM;
goto error;
diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c
index a896b527bcee..9735b75ac933 100644
--- a/drivers/infiniband/sw/siw/siw_main.c
+++ b/drivers/infiniband/sw/siw/siw_main.c
@@ -128,14 +128,14 @@ static int siw_init_cpulist(void)
siw_cpu_info.num_nodes = num_nodes;
siw_cpu_info.tx_valid_cpus =
- kzalloc_objs(struct cpumask *, num_nodes, GFP_KERNEL);
+ kzalloc_objs(struct cpumask *, num_nodes);
if (!siw_cpu_info.tx_valid_cpus) {
siw_cpu_info.num_nodes = 0;
return -ENOMEM;
}
for (i = 0; i < siw_cpu_info.num_nodes; i++) {
siw_cpu_info.tx_valid_cpus[i] =
- kzalloc_obj(struct cpumask, GFP_KERNEL);
+ kzalloc_obj(struct cpumask);
if (!siw_cpu_info.tx_valid_cpus[i])
goto out_err;
diff --git a/drivers/infiniband/sw/siw/siw_mem.c b/drivers/infiniband/sw/siw/siw_mem.c
index 56d3e5c410ce..acb8b7a17687 100644
--- a/drivers/infiniband/sw/siw/siw_mem.c
+++ b/drivers/infiniband/sw/siw/siw_mem.c
@@ -58,7 +58,7 @@ int siw_mr_add_mem(struct siw_mr *mr, struct ib_pd *pd, void *mem_obj,
u64 start, u64 len, int rights)
{
struct siw_device *sdev = to_siw_dev(pd->device);
- struct siw_mem *mem = kzalloc_obj(*mem, GFP_KERNEL);
+ struct siw_mem *mem = kzalloc_obj(*mem);
struct xa_limit limit = XA_LIMIT(1, SIW_STAG_MAX_INDEX);
u32 id, next;
@@ -347,12 +347,12 @@ struct siw_umem *siw_umem_get(struct ib_device *base_dev, u64 start,
num_pages = PAGE_ALIGN(start + len - first_page_va) >> PAGE_SHIFT;
num_chunks = (num_pages >> CHUNK_SHIFT) + 1;
- umem = kzalloc_obj(*umem, GFP_KERNEL);
+ umem = kzalloc_obj(*umem);
if (!umem)
return ERR_PTR(-ENOMEM);
umem->page_chunk =
- kzalloc_objs(struct siw_page_chunk, num_chunks, GFP_KERNEL);
+ kzalloc_objs(struct siw_page_chunk, num_chunks);
if (!umem->page_chunk) {
rv = -ENOMEM;
goto err_out;
@@ -376,7 +376,7 @@ struct siw_umem *siw_umem_get(struct ib_device *base_dev, u64 start,
for (i = 0; num_pages > 0; i++) {
int nents = min_t(int, num_pages, PAGES_PER_CHUNK);
struct page **plist =
- kzalloc_objs(struct page *, nents, GFP_KERNEL);
+ kzalloc_objs(struct page *, nents);
if (!plist) {
rv = -ENOMEM;
diff --git a/drivers/infiniband/sw/siw/siw_qp.c b/drivers/infiniband/sw/siw/siw_qp.c
index cccfef1e27bf..bb780e3904a2 100644
--- a/drivers/infiniband/sw/siw/siw_qp.c
+++ b/drivers/infiniband/sw/siw/siw_qp.c
@@ -391,7 +391,7 @@ void siw_send_terminate(struct siw_qp *qp)
return;
}
- term = kzalloc_obj(*term, GFP_KERNEL);
+ term = kzalloc_obj(*term);
if (!term)
return;
@@ -405,7 +405,7 @@ void siw_send_terminate(struct siw_qp *qp)
if ((qp->term_info.layer == TERM_ERROR_LAYER_DDP) ||
((qp->term_info.layer == TERM_ERROR_LAYER_RDMAP) &&
(qp->term_info.etype != RDMAP_ETYPE_CATASTROPHIC))) {
- err_hdr = kzalloc_obj(*err_hdr, GFP_KERNEL);
+ err_hdr = kzalloc_obj(*err_hdr);
if (!err_hdr) {
kfree(term);
return;
diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c
index 12719394f1ea..ef504db8f2b4 100644
--- a/drivers/infiniband/sw/siw/siw_verbs.c
+++ b/drivers/infiniband/sw/siw/siw_verbs.c
@@ -274,7 +274,7 @@ siw_mmap_entry_insert(struct siw_ucontext *uctx,
void *address, size_t length,
u64 *offset)
{
- struct siw_user_mmap_entry *entry = kzalloc_obj(*entry, GFP_KERNEL);
+ struct siw_user_mmap_entry *entry = kzalloc_obj(*entry);
int rv;
*offset = SIW_INVAL_UOBJ_KEY;
@@ -1360,7 +1360,7 @@ struct ib_mr *siw_reg_user_mr(struct ib_pd *pd, u64 start, u64 len,
umem = NULL;
goto err_out;
}
- mr = kzalloc_obj(*mr, GFP_KERNEL);
+ mr = kzalloc_obj(*mr);
if (!mr) {
rv = -ENOMEM;
goto err_out;
@@ -1441,7 +1441,7 @@ struct ib_mr *siw_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type,
pbl = NULL;
goto err_out;
}
- mr = kzalloc_obj(*mr, GFP_KERNEL);
+ mr = kzalloc_obj(*mr);
if (!mr) {
rv = -ENOMEM;
goto err_out;
@@ -1556,7 +1556,7 @@ struct ib_mr *siw_get_dma_mr(struct ib_pd *pd, int rights)
rv = -ENOMEM;
goto err_out;
}
- mr = kzalloc_obj(*mr, GFP_KERNEL);
+ mr = kzalloc_obj(*mr);
if (!mr) {
rv = -ENOMEM;
goto err_out;