summaryrefslogtreecommitdiff
path: root/drivers/net/team
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/net/team
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 'drivers/net/team')
-rw-r--r--drivers/net/team/team_core.c10
-rw-r--r--drivers/net/team/team_mode_loadbalance.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/team/team_core.c b/drivers/net/team/team_core.c
index 28c09ffd34b8..937dd6dc070b 100644
--- a/drivers/net/team/team_core.c
+++ b/drivers/net/team/team_core.c
@@ -157,7 +157,7 @@ static int __team_option_inst_add(struct team *team, struct team_option *option,
array_size = 1; /* No array but still need one instance */
for (i = 0; i < array_size; i++) {
- opt_inst = kmalloc_obj(*opt_inst, GFP_KERNEL);
+ opt_inst = kmalloc_obj(*opt_inst);
if (!opt_inst)
return -ENOMEM;
opt_inst->option = option;
@@ -256,7 +256,7 @@ static int __team_options_register(struct team *team,
struct team_option **dst_opts;
int err;
- dst_opts = kzalloc_objs(struct team_option *, option_count, GFP_KERNEL);
+ dst_opts = kzalloc_objs(struct team_option *, option_count);
if (!dst_opts)
return -ENOMEM;
for (i = 0; i < option_count; i++, option++) {
@@ -433,7 +433,7 @@ int team_mode_register(const struct team_mode *mode)
mode->priv_size > TEAM_MODE_PRIV_SIZE)
return -EINVAL;
- mitem = kmalloc_obj(*mitem, GFP_KERNEL);
+ mitem = kmalloc_obj(*mitem);
if (!mitem)
return -ENOMEM;
@@ -779,7 +779,7 @@ static int team_queue_override_init(struct team *team)
if (!queue_cnt)
return 0;
- listarr = kmalloc_objs(struct list_head, queue_cnt, GFP_KERNEL);
+ listarr = kmalloc_objs(struct list_head, queue_cnt);
if (!listarr)
return -ENOMEM;
team->qom_lists = listarr;
@@ -1015,7 +1015,7 @@ static int __team_port_enable_netpoll(struct team_port *port)
struct netpoll *np;
int err;
- np = kzalloc_obj(*np, GFP_KERNEL);
+ np = kzalloc_obj(*np);
if (!np)
return -ENOMEM;
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c
index b50c479f06ce..684954c2a8de 100644
--- a/drivers/net/team/team_mode_loadbalance.c
+++ b/drivers/net/team/team_mode_loadbalance.c
@@ -259,7 +259,7 @@ static int __fprog_create(struct sock_fprog_kern **pfprog, u32 data_len,
if (data_len % sizeof(struct sock_filter))
return -EINVAL;
- fprog = kmalloc_obj(*fprog, GFP_KERNEL);
+ fprog = kmalloc_obj(*fprog);
if (!fprog)
return -ENOMEM;
fprog->filter = kmemdup(filter, data_len, GFP_KERNEL);
@@ -594,7 +594,7 @@ static int lb_init(struct team *team)
BUG_ON(!func);
rcu_assign_pointer(lb_priv->select_tx_port_func, func);
- lb_priv->ex = kzalloc_obj(*lb_priv->ex, GFP_KERNEL);
+ lb_priv->ex = kzalloc_obj(*lb_priv->ex);
if (!lb_priv->ex)
return -ENOMEM;
lb_priv->ex->team = team;