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>
This commit is contained in:
Linus Torvalds
2026-02-21 16:37:42 -08:00
parent e19e1b480a
commit bf4afc53b7
6673 changed files with 13013 additions and 13013 deletions

View File

@@ -4714,7 +4714,7 @@ struct workqueue_attrs *alloc_workqueue_attrs_noprof(void)
{
struct workqueue_attrs *attrs;
attrs = kzalloc_obj(*attrs, GFP_KERNEL);
attrs = kzalloc_obj(*attrs);
if (!attrs)
goto fail;
if (!alloc_cpumask_var(&attrs->cpumask, GFP_KERNEL))
@@ -7486,7 +7486,7 @@ int workqueue_sysfs_register(struct workqueue_struct *wq)
if (WARN_ON(wq->flags & __WQ_ORDERED))
return -EINVAL;
wq->wq_dev = wq_dev = kzalloc_obj(*wq_dev, GFP_KERNEL);
wq->wq_dev = wq_dev = kzalloc_obj(*wq_dev);
if (!wq_dev)
return -ENOMEM;
@@ -7879,9 +7879,9 @@ void __init workqueue_init_early(void)
wq_power_efficient = true;
/* initialize WQ_AFFN_SYSTEM pods */
pt->pod_cpus = kzalloc_objs(pt->pod_cpus[0], 1, GFP_KERNEL);
pt->pod_node = kzalloc_objs(pt->pod_node[0], 1, GFP_KERNEL);
pt->cpu_pod = kzalloc_objs(pt->cpu_pod[0], nr_cpu_ids, GFP_KERNEL);
pt->pod_cpus = kzalloc_objs(pt->pod_cpus[0], 1);
pt->pod_node = kzalloc_objs(pt->pod_node[0], 1);
pt->cpu_pod = kzalloc_objs(pt->cpu_pod[0], nr_cpu_ids);
BUG_ON(!pt->pod_cpus || !pt->pod_node || !pt->cpu_pod);
BUG_ON(!zalloc_cpumask_var_node(&pt->pod_cpus[0], GFP_KERNEL, NUMA_NO_NODE));
@@ -8063,7 +8063,7 @@ static void __init init_pod_type(struct wq_pod_type *pt,
pt->nr_pods = 0;
/* init @pt->cpu_pod[] according to @cpus_share_pod() */
pt->cpu_pod = kzalloc_objs(pt->cpu_pod[0], nr_cpu_ids, GFP_KERNEL);
pt->cpu_pod = kzalloc_objs(pt->cpu_pod[0], nr_cpu_ids);
BUG_ON(!pt->cpu_pod);
for_each_possible_cpu(cur) {
@@ -8080,8 +8080,8 @@ static void __init init_pod_type(struct wq_pod_type *pt,
}
/* init the rest to match @pt->cpu_pod[] */
pt->pod_cpus = kzalloc_objs(pt->pod_cpus[0], pt->nr_pods, GFP_KERNEL);
pt->pod_node = kzalloc_objs(pt->pod_node[0], pt->nr_pods, GFP_KERNEL);
pt->pod_cpus = kzalloc_objs(pt->pod_cpus[0], pt->nr_pods);
pt->pod_node = kzalloc_objs(pt->pod_node[0], pt->nr_pods);
BUG_ON(!pt->pod_cpus || !pt->pod_node);
for (pod = 0; pod < pt->nr_pods; pod++)