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

@@ -1811,7 +1811,7 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev,
if (ret)
return ERR_PTR(ret);
gpd_data = kzalloc_obj(*gpd_data, GFP_KERNEL);
gpd_data = kzalloc_obj(*gpd_data);
if (!gpd_data) {
ret = -ENOMEM;
goto err_put;
@@ -1822,7 +1822,7 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev,
/* Allocate data used by a governor. */
if (has_governor) {
td = kzalloc_obj(*td, GFP_KERNEL);
td = kzalloc_obj(*td);
if (!td) {
ret = -ENOMEM;
goto err_free;
@@ -2161,7 +2161,7 @@ static int genpd_add_subdomain(struct generic_pm_domain *genpd,
return -EINVAL;
}
link = kzalloc_obj(*link, GFP_KERNEL);
link = kzalloc_obj(*link);
if (!link)
return -ENOMEM;
@@ -2269,7 +2269,7 @@ static int genpd_set_default_power_state(struct generic_pm_domain *genpd)
{
struct genpd_power_state *state;
state = kzalloc_obj(*state, GFP_KERNEL);
state = kzalloc_obj(*state);
if (!state)
return -ENOMEM;
@@ -2295,7 +2295,7 @@ static int genpd_alloc_data(struct generic_pm_domain *genpd)
return -ENOMEM;
if (genpd->gov) {
gd = kzalloc_obj(*gd, GFP_KERNEL);
gd = kzalloc_obj(*gd);
if (!gd) {
ret = -ENOMEM;
goto free;
@@ -2623,7 +2623,7 @@ static int genpd_add_provider(struct device_node *np, genpd_xlate_t xlate,
{
struct of_genpd_provider *cp;
cp = kzalloc_obj(*cp, GFP_KERNEL);
cp = kzalloc_obj(*cp);
if (!cp)
return -ENOMEM;
@@ -3316,7 +3316,7 @@ struct device *genpd_dev_pm_attach_by_id(struct device *dev,
return ERR_PTR(-ENODEV);
/* Allocate and register device on the genpd bus. */
virt_dev = kzalloc_obj(*virt_dev, GFP_KERNEL);
virt_dev = kzalloc_obj(*virt_dev);
if (!virt_dev)
return ERR_PTR(-ENOMEM);
@@ -3474,7 +3474,7 @@ int of_genpd_parse_idle_states(struct device_node *dn,
return 0;
}
st = kzalloc_objs(*st, ret, GFP_KERNEL);
st = kzalloc_objs(*st, ret);
if (!st)
return -ENOMEM;

View File

@@ -324,7 +324,7 @@ static int __init rcar_gen4_sysc_pd_init(void)
rcar_gen4_sysc_base = base;
domains = kzalloc_obj(*domains, GFP_KERNEL);
domains = kzalloc_obj(*domains);
if (!domains) {
error = -ENOMEM;
goto out_put;

View File

@@ -383,7 +383,7 @@ static int __init rcar_sysc_pd_init(void)
rcar_sysc_extmask_offs = info->extmask_offs;
rcar_sysc_extmask_val = info->extmask_val;
domains = kzalloc_obj(*domains, GFP_KERNEL);
domains = kzalloc_obj(*domains);
if (!domains) {
error = -ENOMEM;
goto out_put;

View File

@@ -277,7 +277,7 @@ static int __init rmobile_add_pm_domains(void __iomem *base,
/* always-on domain */
}
pd = kzalloc_obj(*pd, GFP_KERNEL);
pd = kzalloc_obj(*pd);
if (!pd)
return -ENOMEM;

View File

@@ -65,7 +65,7 @@ static int ux500_pm_domains_probe(struct platform_device *pdev)
if (!np)
return -ENODEV;
genpd_data = kzalloc_obj(*genpd_data, GFP_KERNEL);
genpd_data = kzalloc_obj(*genpd_data);
if (!genpd_data)
return -ENOMEM;

View File

@@ -226,7 +226,7 @@ tegra_bpmp_probe_powergates(struct tegra_bpmp *bpmp,
dev_dbg(bpmp->dev, "maximum powergate ID: %u\n", max_id);
powergates = kzalloc_objs(*powergates, max_id + 1, GFP_KERNEL);
powergates = kzalloc_objs(*powergates, max_id + 1);
if (!powergates)
return -ENOMEM;
@@ -260,7 +260,7 @@ static int tegra_bpmp_add_powergates(struct tegra_bpmp *bpmp,
unsigned int i;
int err;
domains = kzalloc_objs(*domains, count, GFP_KERNEL);
domains = kzalloc_objs(*domains, count);
if (!domains)
return -ENOMEM;