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 /net/ipv6 | |
| 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 'net/ipv6')
| -rw-r--r-- | net/ipv6/addrlabel.c | 2 | ||||
| -rw-r--r-- | net/ipv6/ah6.c | 2 | ||||
| -rw-r--r-- | net/ipv6/ila/ila_xlat.c | 4 | ||||
| -rw-r--r-- | net/ipv6/ioam6.c | 8 | ||||
| -rw-r--r-- | net/ipv6/ip6_fib.c | 2 | ||||
| -rw-r--r-- | net/ipv6/ip6_flowlabel.c | 4 | ||||
| -rw-r--r-- | net/ipv6/ipv6_sockglue.c | 2 | ||||
| -rw-r--r-- | net/ipv6/mcast.c | 8 | ||||
| -rw-r--r-- | net/ipv6/route.c | 4 | ||||
| -rw-r--r-- | net/ipv6/seg6.c | 8 | ||||
| -rw-r--r-- | net/ipv6/sit.c | 2 |
11 files changed, 23 insertions, 23 deletions
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index e3b6b9a3f02e..f4b2618446bd 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c @@ -180,7 +180,7 @@ static struct ip6addrlbl_entry *ip6addrlbl_alloc(const struct in6_addr *prefix, break; } - newp = kmalloc_obj(*newp, GFP_KERNEL); + newp = kmalloc_obj(*newp); if (!newp) return ERR_PTR(-ENOMEM); diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 7ad0c894f2fd..cb26beea4398 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -691,7 +691,7 @@ static int ah6_init_state(struct xfrm_state *x, struct netlink_ext_ack *extack) goto error; } - ahp = kzalloc_obj(*ahp, GFP_KERNEL); + ahp = kzalloc_obj(*ahp); if (!ahp) return -ENOMEM; diff --git a/net/ipv6/ila/ila_xlat.c b/net/ipv6/ila/ila_xlat.c index c5ff34040175..8991805fc3d6 100644 --- a/net/ipv6/ila/ila_xlat.c +++ b/net/ipv6/ila/ila_xlat.c @@ -220,7 +220,7 @@ static int ila_add_mapping(struct net *net, struct ila_xlat_params *xp) return err; } - ila = kzalloc_obj(*ila, GFP_KERNEL); + ila = kzalloc_obj(*ila); if (!ila) return -ENOMEM; @@ -509,7 +509,7 @@ int ila_xlat_nl_dump_start(struct netlink_callback *cb) struct ila_net *ilan = net_generic(net, ila_net_id); struct ila_dump_iter *iter; - iter = kmalloc_obj(*iter, GFP_KERNEL); + iter = kmalloc_obj(*iter); if (!iter) return -ENOMEM; diff --git a/net/ipv6/ioam6.c b/net/ipv6/ioam6.c index b6c9e48891fe..b76f89d92e7b 100644 --- a/net/ipv6/ioam6.c +++ b/net/ipv6/ioam6.c @@ -127,7 +127,7 @@ static int ioam6_genl_addns(struct sk_buff *skb, struct genl_info *info) goto out_unlock; } - ns = kzalloc_obj(*ns, GFP_KERNEL); + ns = kzalloc_obj(*ns); if (!ns) { err = -ENOMEM; goto out_unlock; @@ -245,7 +245,7 @@ static int ioam6_genl_dumpns_start(struct netlink_callback *cb) struct rhashtable_iter *iter = (struct rhashtable_iter *)cb->args[0]; if (!iter) { - iter = kmalloc_obj(*iter, GFP_KERNEL); + iter = kmalloc_obj(*iter); if (!iter) return -ENOMEM; @@ -431,7 +431,7 @@ static int ioam6_genl_dumpsc_start(struct netlink_callback *cb) struct rhashtable_iter *iter = (struct rhashtable_iter *)cb->args[0]; if (!iter) { - iter = kmalloc_obj(*iter, GFP_KERNEL); + iter = kmalloc_obj(*iter); if (!iter) return -ENOMEM; @@ -975,7 +975,7 @@ static int __net_init ioam6_net_init(struct net *net) struct ioam6_pernet_data *nsdata; int err = -ENOMEM; - nsdata = kzalloc_obj(*nsdata, GFP_KERNEL); + nsdata = kzalloc_obj(*nsdata); if (!nsdata) goto out; diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 6a26d9448395..2029d40a9d2c 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -2464,7 +2464,7 @@ static int __net_init fib6_net_init(struct net *net) INIT_LIST_HEAD(&net->ipv6.fib6_walkers); timer_setup(&net->ipv6.ip6_fib_timer, fib6_gc_timer_cb, 0); - net->ipv6.rt6_stats = kzalloc_obj(*net->ipv6.rt6_stats, GFP_KERNEL); + net->ipv6.rt6_stats = kzalloc_obj(*net->ipv6.rt6_stats); if (!net->ipv6.rt6_stats) goto out_notifier; diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index f89e0af5a9ed..7c12bf75beed 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c @@ -386,7 +386,7 @@ fl_create(struct net *net, struct sock *sk, struct in6_flowlabel_req *freq, goto done; err = -ENOMEM; - fl = kzalloc_obj(*fl, GFP_KERNEL); + fl = kzalloc_obj(*fl); if (!fl) goto done; @@ -638,7 +638,7 @@ static int ipv6_flowlabel_get(struct sock *sk, struct in6_flowlabel_req *freq, if (!fl) return err; - sfl1 = kmalloc_obj(*sfl1, GFP_KERNEL); + sfl1 = kmalloc_obj(*sfl1); if (freq->flr_label) { err = -EEXIST; diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 152388dc96ec..02c4cab60c69 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -66,7 +66,7 @@ int ip6_ra_control(struct sock *sk, int sel) if (sk->sk_type != SOCK_RAW || inet_sk(sk)->inet_num != IPPROTO_RAW) return -ENOPROTOOPT; - new_ra = (sel >= 0) ? kmalloc_obj(*new_ra, GFP_KERNEL) : NULL; + new_ra = (sel >= 0) ? kmalloc_obj(*new_ra) : NULL; if (sel >= 0 && !new_ra) return -ENOMEM; diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index f982f3b71435..3330adcf26db 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -740,7 +740,7 @@ static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im) * for deleted items allows change reports to use common code with * non-deleted or query-response MCA's. */ - pmc = kzalloc_obj(*pmc, GFP_KERNEL); + pmc = kzalloc_obj(*pmc); if (!pmc) return; @@ -868,7 +868,7 @@ static struct ifmcaddr6 *mca_alloc(struct inet6_dev *idev, mc_assert_locked(idev); - mc = kzalloc_obj(*mc, GFP_KERNEL); + mc = kzalloc_obj(*mc); if (!mc) return NULL; @@ -2415,7 +2415,7 @@ static int ip6_mc_add1_src(struct ifmcaddr6 *pmc, int sfmode, psf_prev = psf; } if (!psf) { - psf = kzalloc_obj(*psf, GFP_KERNEL); + psf = kzalloc_obj(*psf); if (!psf) return -ENOBUFS; @@ -2500,7 +2500,7 @@ static int sf_setstate(struct ifmcaddr6 *pmc) &psf->sf_addr)) break; if (!dpsf) { - dpsf = kmalloc_obj(*dpsf, GFP_KERNEL); + dpsf = kmalloc_obj(*dpsf); if (!dpsf) continue; *dpsf = *psf; diff --git a/net/ipv6/route.c b/net/ipv6/route.c index dd50cf2bf6ef..85df25c36409 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -5331,7 +5331,7 @@ static int ip6_route_info_append(struct list_head *rt6_nh_list, return -EEXIST; } - nh = kzalloc_obj(*nh, GFP_KERNEL); + nh = kzalloc_obj(*nh); if (!nh) return -ENOMEM; @@ -6778,7 +6778,7 @@ static struct pernet_operations ip6_route_net_ops = { static int __net_init ipv6_inetpeer_init(struct net *net) { - struct inet_peer_base *bp = kmalloc_obj(*bp, GFP_KERNEL); + struct inet_peer_base *bp = kmalloc_obj(*bp); if (!bp) return -ENOMEM; diff --git a/net/ipv6/seg6.c b/net/ipv6/seg6.c index b53c491079cd..1c3ad25700c4 100644 --- a/net/ipv6/seg6.c +++ b/net/ipv6/seg6.c @@ -202,7 +202,7 @@ static int seg6_genl_sethmac(struct sk_buff *skb, struct genl_info *info) secret = (char *)nla_data(info->attrs[SEG6_ATTR_SECRET]); - hinfo = kzalloc_obj(*hinfo, GFP_KERNEL); + hinfo = kzalloc_obj(*hinfo); if (!hinfo) { err = -ENOMEM; goto out_unlock; @@ -339,7 +339,7 @@ static int seg6_genl_dumphmac_start(struct netlink_callback *cb) iter = (struct rhashtable_iter *)cb->args[0]; if (!iter) { - iter = kmalloc_obj(*iter, GFP_KERNEL); + iter = kmalloc_obj(*iter); if (!iter) return -ENOMEM; @@ -421,13 +421,13 @@ static int __net_init seg6_net_init(struct net *net) { struct seg6_pernet_data *sdata; - sdata = kzalloc_obj(*sdata, GFP_KERNEL); + sdata = kzalloc_obj(*sdata); if (!sdata) return -ENOMEM; mutex_init(&sdata->lock); - sdata->tun_src = kzalloc_obj(*sdata->tun_src, GFP_KERNEL); + sdata->tun_src = kzalloc_obj(*sdata->tun_src); if (!sdata->tun_src) { kfree(sdata); return -ENOMEM; diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index ca7955831c28..6a7b8abb0477 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -394,7 +394,7 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg) goto out; } - p = kzalloc_obj(struct ip_tunnel_prl_entry, GFP_KERNEL); + p = kzalloc_obj(struct ip_tunnel_prl_entry); if (!p) { err = -ENOBUFS; goto out; |
