summaryrefslogtreecommitdiff
path: root/net/openvswitch
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/openvswitch
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/openvswitch')
-rw-r--r--net/openvswitch/datapath.c4
-rw-r--r--net/openvswitch/flow_netlink.c2
-rw-r--r--net/openvswitch/flow_table.c10
3 files changed, 8 insertions, 8 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index b4fb83c3c0f9..bbb9b52861c0 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1029,7 +1029,7 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info)
}
/* Extract key. */
- key = kzalloc_obj(*key, GFP_KERNEL);
+ key = kzalloc_obj(*key);
if (!key) {
error = -ENOMEM;
goto err_kfree_flow;
@@ -1827,7 +1827,7 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info)
return -ENOMEM;
err = -ENOMEM;
- dp = kzalloc_obj(*dp, GFP_KERNEL);
+ dp = kzalloc_obj(*dp);
if (dp == NULL)
goto err_destroy_reply;
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index 54fd208a1a68..67fbf6e48a30 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -1890,7 +1890,7 @@ int ovs_nla_get_identifier(struct sw_flow_id *sfid, const struct nlattr *ufid,
return 0;
/* If UFID was not provided, use unmasked key. */
- new_key = kmalloc_obj(*new_key, GFP_KERNEL);
+ new_key = kmalloc_obj(*new_key);
if (!new_key)
return -ENOMEM;
memcpy(new_key, key, sizeof(*key));
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index b75236aa4414..61c6a5f77c2e 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -150,13 +150,13 @@ static void __table_instance_destroy(struct table_instance *ti)
static struct table_instance *table_instance_alloc(int new_size)
{
- struct table_instance *ti = kmalloc_obj(*ti, GFP_KERNEL);
+ struct table_instance *ti = kmalloc_obj(*ti);
int i;
if (!ti)
return NULL;
- ti->buckets = kvmalloc_objs(struct hlist_head, new_size, GFP_KERNEL);
+ ti->buckets = kvmalloc_objs(struct hlist_head, new_size);
if (!ti->buckets) {
kfree(ti);
return NULL;
@@ -366,7 +366,7 @@ static struct mask_cache *tbl_mask_cache_alloc(u32 size)
(size * sizeof(struct mask_cache_entry)) > PCPU_MIN_UNIT_SIZE)
return NULL;
- new = kzalloc_obj(*new, GFP_KERNEL);
+ new = kzalloc_obj(*new);
if (!new)
return NULL;
@@ -964,7 +964,7 @@ static struct sw_flow_mask *mask_alloc(void)
{
struct sw_flow_mask *mask;
- mask = kmalloc_obj(*mask, GFP_KERNEL);
+ mask = kmalloc_obj(*mask);
if (mask)
mask->ref_count = 1;
@@ -1109,7 +1109,7 @@ void ovs_flow_masks_rebalance(struct flow_table *table)
int i;
/* Build array of all current entries with use counters. */
- masks_and_count = kmalloc_objs(*masks_and_count, ma->max, GFP_KERNEL);
+ masks_and_count = kmalloc_objs(*masks_and_count, ma->max);
if (!masks_and_count)
return;