summaryrefslogtreecommitdiff
path: root/net/xdp
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 /net/xdp
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
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 'net/xdp')
-rw-r--r--net/xdp/xdp_umem.c2
-rw-r--r--net/xdp/xsk_buff_pool.c4
-rw-r--r--net/xdp/xsk_queue.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c
index 4c94ec312d75..066ce07c506d 100644
--- a/net/xdp/xdp_umem.c
+++ b/net/xdp/xdp_umem.c
@@ -250,7 +250,7 @@ struct xdp_umem *xdp_umem_create(struct xdp_umem_reg *mr)
struct xdp_umem *umem;
int err;
- umem = kzalloc_obj(*umem, GFP_KERNEL);
+ umem = kzalloc_obj(*umem);
if (!umem)
return ERR_PTR(-ENOMEM);
diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c
index a8f932b28ee3..c5015802f946 100644
--- a/net/xdp/xsk_buff_pool.c
+++ b/net/xdp/xsk_buff_pool.c
@@ -63,7 +63,7 @@ struct xsk_buff_pool *xp_create_and_assign_umem(struct xdp_sock *xs,
if (!pool)
goto out;
- pool->heads = kvzalloc_objs(*pool->heads, umem->chunks, GFP_KERNEL);
+ pool->heads = kvzalloc_objs(*pool->heads, umem->chunks);
if (!pool->heads)
goto out;
@@ -328,7 +328,7 @@ static struct xsk_dma_map *xp_create_dma_map(struct device *dev, struct net_devi
{
struct xsk_dma_map *dma_map;
- dma_map = kzalloc_obj(*dma_map, GFP_KERNEL);
+ dma_map = kzalloc_obj(*dma_map);
if (!dma_map)
return NULL;
diff --git a/net/xdp/xsk_queue.c b/net/xdp/xsk_queue.c
index ef089b9c4fc8..4dd01b7d858e 100644
--- a/net/xdp/xsk_queue.c
+++ b/net/xdp/xsk_queue.c
@@ -26,7 +26,7 @@ struct xsk_queue *xskq_create(u32 nentries, bool umem_queue)
struct xsk_queue *q;
size_t size;
- q = kzalloc_obj(*q, GFP_KERNEL);
+ q = kzalloc_obj(*q);
if (!q)
return NULL;