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/cpuidle | |
| 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/cpuidle')
| -rw-r--r-- | drivers/cpuidle/coupled.c | 2 | ||||
| -rw-r--r-- | drivers/cpuidle/cpuidle-psci-domain.c | 2 | ||||
| -rw-r--r-- | drivers/cpuidle/cpuidle-riscv-sbi.c | 2 | ||||
| -rw-r--r-- | drivers/cpuidle/dt_idle_genpd.c | 2 | ||||
| -rw-r--r-- | drivers/cpuidle/sysfs.c | 6 |
5 files changed, 7 insertions, 7 deletions
diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c index e22df988bb07..fb91a9e0e3c2 100644 --- a/drivers/cpuidle/coupled.c +++ b/drivers/cpuidle/coupled.c @@ -651,7 +651,7 @@ int cpuidle_coupled_register_device(struct cpuidle_device *dev) } /* No existing coupled info found, create a new one */ - coupled = kzalloc_obj(struct cpuidle_coupled, GFP_KERNEL); + coupled = kzalloc_obj(struct cpuidle_coupled); if (!coupled) return -ENOMEM; diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c index a53ad31f9b3d..b9e4ad7d43a3 100644 --- a/drivers/cpuidle/cpuidle-psci-domain.c +++ b/drivers/cpuidle/cpuidle-psci-domain.c @@ -55,7 +55,7 @@ static int psci_pd_init(struct device_node *np, bool use_osi) if (!pd) goto out; - pd_provider = kzalloc_obj(*pd_provider, GFP_KERNEL); + pd_provider = kzalloc_obj(*pd_provider); if (!pd_provider) goto free_pd; diff --git a/drivers/cpuidle/cpuidle-riscv-sbi.c b/drivers/cpuidle/cpuidle-riscv-sbi.c index 875c4697b953..a13e90bb43bd 100644 --- a/drivers/cpuidle/cpuidle-riscv-sbi.c +++ b/drivers/cpuidle/cpuidle-riscv-sbi.c @@ -380,7 +380,7 @@ static int sbi_pd_init(struct device_node *np) if (!pd) goto out; - pd_provider = kzalloc_obj(*pd_provider, GFP_KERNEL); + pd_provider = kzalloc_obj(*pd_provider); if (!pd_provider) goto free_pd; diff --git a/drivers/cpuidle/dt_idle_genpd.c b/drivers/cpuidle/dt_idle_genpd.c index 6b1f6d4686a7..d292975cc468 100644 --- a/drivers/cpuidle/dt_idle_genpd.c +++ b/drivers/cpuidle/dt_idle_genpd.c @@ -95,7 +95,7 @@ struct generic_pm_domain *dt_idle_pd_alloc(struct device_node *np, struct genpd_power_state *states = NULL; int ret, state_count = 0; - pd = kzalloc_obj(*pd, GFP_KERNEL); + pd = kzalloc_obj(*pd); if (!pd) goto out; diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index abee6f73a6e1..b81d22479234 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c @@ -482,7 +482,7 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device) /* state statistics */ for (i = 0; i < drv->state_count; i++) { - kobj = kzalloc_obj(struct cpuidle_state_kobj, GFP_KERNEL); + kobj = kzalloc_obj(struct cpuidle_state_kobj); if (!kobj) { ret = -ENOMEM; goto error_state; @@ -618,7 +618,7 @@ static int cpuidle_add_driver_sysfs(struct cpuidle_device *dev) struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); int ret; - kdrv = kzalloc_obj(*kdrv, GFP_KERNEL); + kdrv = kzalloc_obj(*kdrv); if (!kdrv) return -ENOMEM; @@ -712,7 +712,7 @@ int cpuidle_add_sysfs(struct cpuidle_device *dev) if (!cpu_dev) return -ENODEV; - kdev = kzalloc_obj(*kdev, GFP_KERNEL); + kdev = kzalloc_obj(*kdev); if (!kdev) return -ENOMEM; kdev->dev = dev; |
