diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/pmdomain | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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 'drivers/pmdomain')
| -rw-r--r-- | drivers/pmdomain/core.c | 16 | ||||
| -rw-r--r-- | drivers/pmdomain/renesas/rcar-gen4-sysc.c | 2 | ||||
| -rw-r--r-- | drivers/pmdomain/renesas/rcar-sysc.c | 2 | ||||
| -rw-r--r-- | drivers/pmdomain/renesas/rmobile-sysc.c | 2 | ||||
| -rw-r--r-- | drivers/pmdomain/st/ste-ux500-pm-domain.c | 2 | ||||
| -rw-r--r-- | drivers/pmdomain/tegra/powergate-bpmp.c | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index a324740b248b..52ea84e548ff 100644 --- a/drivers/pmdomain/core.c +++ b/drivers/pmdomain/core.c @@ -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; diff --git a/drivers/pmdomain/renesas/rcar-gen4-sysc.c b/drivers/pmdomain/renesas/rcar-gen4-sysc.c index a62937a9a045..0c6c639a91d0 100644 --- a/drivers/pmdomain/renesas/rcar-gen4-sysc.c +++ b/drivers/pmdomain/renesas/rcar-gen4-sysc.c @@ -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; diff --git a/drivers/pmdomain/renesas/rcar-sysc.c b/drivers/pmdomain/renesas/rcar-sysc.c index aa5485876e0a..bd7bb9cbd9da 100644 --- a/drivers/pmdomain/renesas/rcar-sysc.c +++ b/drivers/pmdomain/renesas/rcar-sysc.c @@ -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; diff --git a/drivers/pmdomain/renesas/rmobile-sysc.c b/drivers/pmdomain/renesas/rmobile-sysc.c index 541f5739c13a..93103ff33d6e 100644 --- a/drivers/pmdomain/renesas/rmobile-sysc.c +++ b/drivers/pmdomain/renesas/rmobile-sysc.c @@ -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; diff --git a/drivers/pmdomain/st/ste-ux500-pm-domain.c b/drivers/pmdomain/st/ste-ux500-pm-domain.c index 45ea76b9c7f8..6896cb4a7b71 100644 --- a/drivers/pmdomain/st/ste-ux500-pm-domain.c +++ b/drivers/pmdomain/st/ste-ux500-pm-domain.c @@ -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; diff --git a/drivers/pmdomain/tegra/powergate-bpmp.c b/drivers/pmdomain/tegra/powergate-bpmp.c index 43a46edd1ebc..8cde4f384846 100644 --- a/drivers/pmdomain/tegra/powergate-bpmp.c +++ b/drivers/pmdomain/tegra/powergate-bpmp.c @@ -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; |
