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/base/power | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip | |
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/base/power')
| -rw-r--r-- | drivers/base/power/clock_ops.c | 4 | ||||
| -rw-r--r-- | drivers/base/power/common.c | 4 | ||||
| -rw-r--r-- | drivers/base/power/qos.c | 10 | ||||
| -rw-r--r-- | drivers/base/power/wakeirq.c | 4 | ||||
| -rw-r--r-- | drivers/base/power/wakeup.c | 2 | ||||
| -rw-r--r-- | drivers/base/power/wakeup_stats.c | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index 0ac1e6757ec5..59bb37e8244c 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c @@ -201,7 +201,7 @@ static int __pm_clk_add(struct device *dev, const char *con_id, if (!psd) return -EINVAL; - ce = kzalloc_obj(*ce, GFP_KERNEL); + ce = kzalloc_obj(*ce); if (!ce) return -ENOMEM; @@ -282,7 +282,7 @@ int of_pm_clk_add_clks(struct device *dev) if (count <= 0) return -ENODEV; - clks = kzalloc_objs(*clks, count, GFP_KERNEL); + clks = kzalloc_objs(*clks, count); if (!clks) return -ENOMEM; diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c index 5902658ee94f..9bef9248a705 100644 --- a/drivers/base/power/common.c +++ b/drivers/base/power/common.c @@ -27,7 +27,7 @@ int dev_pm_get_subsys_data(struct device *dev) { struct pm_subsys_data *psd; - psd = kzalloc_obj(*psd, GFP_KERNEL); + psd = kzalloc_obj(*psd); if (!psd) return -ENOMEM; @@ -222,7 +222,7 @@ int dev_pm_domain_attach_list(struct device *dev, if (num_pds <= 0) return 0; - pds = kzalloc_obj(*pds, GFP_KERNEL); + pds = kzalloc_obj(*pds); if (!pds) return -ENOMEM; diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c index 31acf7ef5d87..9b69827cb0d0 100644 --- a/drivers/base/power/qos.c +++ b/drivers/base/power/qos.c @@ -198,11 +198,11 @@ static int dev_pm_qos_constraints_allocate(struct device *dev) struct pm_qos_constraints *c; struct blocking_notifier_head *n; - qos = kzalloc_obj(*qos, GFP_KERNEL); + qos = kzalloc_obj(*qos); if (!qos) return -ENOMEM; - n = kzalloc_objs(*n, 3, GFP_KERNEL); + n = kzalloc_objs(*n, 3); if (!n) { kfree(qos); return -ENOMEM; @@ -704,7 +704,7 @@ int dev_pm_qos_expose_latency_limit(struct device *dev, s32 value) if (!device_is_registered(dev) || value < 0) return -EINVAL; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -780,7 +780,7 @@ int dev_pm_qos_expose_flags(struct device *dev, s32 val) if (!device_is_registered(dev)) return -EINVAL; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -919,7 +919,7 @@ int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val) ret = -EINVAL; goto out; } - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) { ret = -ENOMEM; goto out; diff --git a/drivers/base/power/wakeirq.c b/drivers/base/power/wakeirq.c index 19abc6a8eaa3..ad23f0fa5d1a 100644 --- a/drivers/base/power/wakeirq.c +++ b/drivers/base/power/wakeirq.c @@ -55,7 +55,7 @@ int dev_pm_set_wake_irq(struct device *dev, int irq) if (irq < 0) return -EINVAL; - wirq = kzalloc_obj(*wirq, GFP_KERNEL); + wirq = kzalloc_obj(*wirq); if (!wirq) return -ENOMEM; @@ -179,7 +179,7 @@ static int __dev_pm_set_dedicated_wake_irq(struct device *dev, int irq, unsigned if (irq < 0) return -EINVAL; - wirq = kzalloc_obj(*wirq, GFP_KERNEL); + wirq = kzalloc_obj(*wirq); if (!wirq) return -ENOMEM; diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index a3714a9e4e46..b8e48a023bf0 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -83,7 +83,7 @@ static struct wakeup_source *wakeup_source_create(const char *name) const char *ws_name; int id; - ws = kzalloc_obj(*ws, GFP_KERNEL); + ws = kzalloc_obj(*ws); if (!ws) goto err_ws; diff --git a/drivers/base/power/wakeup_stats.c b/drivers/base/power/wakeup_stats.c index af888678156f..308f8bde9aa3 100644 --- a/drivers/base/power/wakeup_stats.c +++ b/drivers/base/power/wakeup_stats.c @@ -141,7 +141,7 @@ static struct device *wakeup_source_device_create(struct device *parent, struct device *dev = NULL; int retval; - dev = kzalloc_obj(*dev, GFP_KERNEL); + dev = kzalloc_obj(*dev); if (!dev) { retval = -ENOMEM; goto error; |
