summaryrefslogtreecommitdiff
path: root/net/openvswitch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-22 07:03:00 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-22 07:03:00 +0300
commit32a92f8c89326985e05dce8b22d3f0aa07a3e1bd (patch)
tree65f84985b9ed2d5cf3c5243aca78d9428e25c312 /net/openvswitch
parent323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff)
downloadlinux-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.tar.xz
Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
This converts some of the visually simpler cases that have been split over multiple lines. I only did the ones that are easy to verify the resulting diff by having just that final GFP_KERNEL argument on the next line. Somebody should probably do a proper coccinelle script for this, but for me the trivial script actually resulted in an assertion failure in the middle of the script. I probably had made it a bit _too_ trivial. So after fighting that far a while I decided to just do some of the syntactically simpler cases with variations of the previous 'sed' scripts. The more syntactically complex multi-line cases would mostly really want whitespace cleanup anyway. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/conntrack.c6
-rw-r--r--net/openvswitch/datapath.c3
-rw-r--r--net/openvswitch/vport.c3
3 files changed, 4 insertions, 8 deletions
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 8051e3127d2c..7c9256572284 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -1586,15 +1586,13 @@ static int ovs_ct_limit_init(struct net *net, struct ovs_net *ovs_net)
{
int i, err;
- ovs_net->ct_limit_info = kmalloc_obj(*ovs_net->ct_limit_info,
- GFP_KERNEL);
+ ovs_net->ct_limit_info = kmalloc_obj(*ovs_net->ct_limit_info);
if (!ovs_net->ct_limit_info)
return -ENOMEM;
ovs_net->ct_limit_info->default_limit = OVS_CT_LIMIT_DEFAULT;
ovs_net->ct_limit_info->limits =
- kmalloc_objs(struct hlist_head, CT_LIMIT_HASH_BUCKETS,
- GFP_KERNEL);
+ kmalloc_objs(struct hlist_head, CT_LIMIT_HASH_BUCKETS);
if (!ovs_net->ct_limit_info->limits) {
kfree(ovs_net->ct_limit_info);
return -ENOMEM;
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index bbb9b52861c0..e209099218b4 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1797,8 +1797,7 @@ static int ovs_dp_vport_init(struct datapath *dp)
{
int i;
- dp->ports = kmalloc_objs(struct hlist_head, DP_VPORT_HASH_BUCKETS,
- GFP_KERNEL);
+ dp->ports = kmalloc_objs(struct hlist_head, DP_VPORT_HASH_BUCKETS);
if (!dp->ports)
return -ENOMEM;
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 4b83512cbc65..23f629e94a36 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -34,8 +34,7 @@ static struct hlist_head *dev_table;
*/
int ovs_vport_init(void)
{
- dev_table = kzalloc_objs(struct hlist_head, VPORT_HASH_BUCKETS,
- GFP_KERNEL);
+ dev_table = kzalloc_objs(struct hlist_head, VPORT_HASH_BUCKETS);
if (!dev_table)
return -ENOMEM;