From bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 21 Feb 2026 16:37:42 -0800 Subject: Convert 'alloc_obj' family to use the new default GFP_KERNEL argument This was done entirely with mindless brute force, using git grep -l '\ --- net/dsa/dsa.c | 8 ++++---- net/dsa/port.c | 4 ++-- net/dsa/switch.c | 8 ++++---- net/dsa/tag_8021q.c | 4 ++-- net/dsa/tag_ksz.c | 2 +- net/dsa/tag_ocelot_8021q.c | 2 +- net/dsa/tag_qca.c | 2 +- net/dsa/tag_sja1105.c | 2 +- net/dsa/user.c | 10 +++++----- 9 files changed, 21 insertions(+), 21 deletions(-) (limited to 'net/dsa') diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index b0ae980ca684..9cb732f6b1e3 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -213,7 +213,7 @@ static struct dsa_switch_tree *dsa_tree_alloc(int index) { struct dsa_switch_tree *dst; - dst = kzalloc_obj(*dst, GFP_KERNEL); + dst = kzalloc_obj(*dst); if (!dst) return NULL; @@ -298,7 +298,7 @@ static struct dsa_link *dsa_link_touch(struct dsa_port *dp, if (dl->dp == dp && dl->link_dp == link_dp) return dl; - dl = kzalloc_obj(*dl, GFP_KERNEL); + dl = kzalloc_obj(*dl); if (!dl) return NULL; @@ -844,7 +844,7 @@ static int dsa_tree_setup_lags(struct dsa_switch_tree *dst) if (!len) return 0; - dst->lags = kzalloc_objs(*dst->lags, len, GFP_KERNEL); + dst->lags = kzalloc_objs(*dst->lags, len); if (!dst->lags) return -ENOMEM; @@ -1092,7 +1092,7 @@ static struct dsa_port *dsa_port_touch(struct dsa_switch *ds, int index) if (dp->index == index) return dp; - dp = kzalloc_obj(*dp, GFP_KERNEL); + dp = kzalloc_obj(*dp); if (!dp) return NULL; diff --git a/net/dsa/port.c b/net/dsa/port.c index 4da911edc512..1f5536c0dffc 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -431,7 +431,7 @@ static int dsa_port_bridge_create(struct dsa_port *dp, return 0; } - bridge = kzalloc_obj(*bridge, GFP_KERNEL); + bridge = kzalloc_obj(*bridge); if (!bridge) return -ENOMEM; @@ -617,7 +617,7 @@ static int dsa_port_lag_create(struct dsa_port *dp, return 0; } - lag = kzalloc_obj(*lag, GFP_KERNEL); + lag = kzalloc_obj(*lag); if (!lag) return -ENOMEM; diff --git a/net/dsa/switch.c b/net/dsa/switch.c index e00997977c93..a670a04edb72 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -182,7 +182,7 @@ static int dsa_port_do_mdb_add(struct dsa_port *dp, goto out; } - a = kzalloc_obj(*a, GFP_KERNEL); + a = kzalloc_obj(*a); if (!a) { err = -ENOMEM; goto out; @@ -280,7 +280,7 @@ static int dsa_port_do_fdb_add(struct dsa_port *dp, const unsigned char *addr, goto out; } - a = kzalloc_obj(*a, GFP_KERNEL); + a = kzalloc_obj(*a); if (!a) { err = -ENOMEM; goto out; @@ -368,7 +368,7 @@ static int dsa_switch_do_lag_fdb_add(struct dsa_switch *ds, struct dsa_lag *lag, goto out; } - a = kzalloc_obj(*a, GFP_KERNEL); + a = kzalloc_obj(*a); if (!a) { err = -ENOMEM; goto out; @@ -719,7 +719,7 @@ static int dsa_port_do_vlan_add(struct dsa_port *dp, goto out; } - v = kzalloc_obj(*v, GFP_KERNEL); + v = kzalloc_obj(*v); if (!v) { err = -ENOMEM; goto out; diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c index c9bea6808da3..f91646e60246 100644 --- a/net/dsa/tag_8021q.c +++ b/net/dsa/tag_8021q.c @@ -158,7 +158,7 @@ static int dsa_port_do_tag_8021q_vlan_add(struct dsa_port *dp, u16 vid, return 0; } - v = kzalloc_obj(*v, GFP_KERNEL); + v = kzalloc_obj(*v); if (!v) return -ENOMEM; @@ -420,7 +420,7 @@ int dsa_tag_8021q_register(struct dsa_switch *ds, __be16 proto) struct dsa_8021q_context *ctx; int err; - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return -ENOMEM; diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c index 15aa44478807..d2475c3bbb7d 100644 --- a/net/dsa/tag_ksz.c +++ b/net/dsa/tag_ksz.c @@ -62,7 +62,7 @@ static int ksz_connect(struct dsa_switch *ds) struct ksz_tagger_private *priv; int ret; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/net/dsa/tag_ocelot_8021q.c b/net/dsa/tag_ocelot_8021q.c index b9bf2895309a..e89d9254e90a 100644 --- a/net/dsa/tag_ocelot_8021q.c +++ b/net/dsa/tag_ocelot_8021q.c @@ -106,7 +106,7 @@ static int ocelot_connect(struct dsa_switch *ds) struct ocelot_8021q_tagger_private *priv; int err; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c index 4326487c1f29..9e3b429e8b36 100644 --- a/net/dsa/tag_qca.c +++ b/net/dsa/tag_qca.c @@ -92,7 +92,7 @@ static int qca_tag_connect(struct dsa_switch *ds) { struct qca_tagger_data *tagger_data; - tagger_data = kzalloc_obj(*tagger_data, GFP_KERNEL); + tagger_data = kzalloc_obj(*tagger_data); if (!tagger_data) return -ENOMEM; diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c index 2083ef3b4b90..de6d4ce8668b 100644 --- a/net/dsa/tag_sja1105.c +++ b/net/dsa/tag_sja1105.c @@ -701,7 +701,7 @@ static int sja1105_connect(struct dsa_switch *ds) struct kthread_worker *xmit_worker; int err; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/net/dsa/user.c b/net/dsa/user.c index 5df8cb69295d..c4bd6fe90b45 100644 --- a/net/dsa/user.c +++ b/net/dsa/user.c @@ -1318,7 +1318,7 @@ static int dsa_user_netpoll_setup(struct net_device *dev) struct netpoll *netpoll; int err = 0; - netpoll = kzalloc_obj(*netpoll, GFP_KERNEL); + netpoll = kzalloc_obj(*netpoll); if (!netpoll) return -ENOMEM; @@ -1430,7 +1430,7 @@ dsa_user_add_cls_matchall_mirred(struct net_device *dev, return -EOPNOTSUPP; } - mall_tc_entry = kzalloc_obj(*mall_tc_entry, GFP_KERNEL); + mall_tc_entry = kzalloc_obj(*mall_tc_entry); if (!mall_tc_entry) return -ENOMEM; @@ -1490,7 +1490,7 @@ dsa_user_add_cls_matchall_police(struct net_device *dev, act = &cls->rule->action.entries[0]; - mall_tc_entry = kzalloc_obj(*mall_tc_entry, GFP_KERNEL); + mall_tc_entry = kzalloc_obj(*mall_tc_entry); if (!mall_tc_entry) return -ENOMEM; @@ -1823,7 +1823,7 @@ static int dsa_user_vlan_rx_add_vid(struct net_device *dev, __be16 proto, !dsa_switch_supports_mc_filtering(ds)) return 0; - v = kzalloc_obj(*v, GFP_KERNEL); + v = kzalloc_obj(*v); if (!v) { ret = -ENOMEM; goto rollback; @@ -2070,7 +2070,7 @@ static void dsa_bridge_mtu_normalization(struct dsa_port *dp) if (min_mtu > user->mtu) min_mtu = user->mtu; - hw_port = kzalloc_obj(*hw_port, GFP_KERNEL); + hw_port = kzalloc_obj(*hw_port); if (!hw_port) goto out; -- cgit v1.2.3