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/platform/chrome | |
| 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/platform/chrome')
| -rw-r--r-- | drivers/platform/chrome/chromeos_laptop.c | 2 | ||||
| -rw-r--r-- | drivers/platform/chrome/cros_ec_chardev.c | 2 | ||||
| -rw-r--r-- | drivers/platform/chrome/wilco_ec/event.c | 2 | ||||
| -rw-r--r-- | drivers/platform/chrome/wilco_ec/telemetry.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c index 7a019827afa5..042f8ca6a463 100644 --- a/drivers/platform/chrome/chromeos_laptop.c +++ b/drivers/platform/chrome/chromeos_laptop.c @@ -880,7 +880,7 @@ chromeos_laptop_prepare(const struct chromeos_laptop *src) struct chromeos_laptop *cros_laptop; int error; - cros_laptop = kzalloc_obj(*cros_laptop, GFP_KERNEL); + cros_laptop = kzalloc_obj(*cros_laptop); if (!cros_laptop) return ERR_PTR(-ENOMEM); diff --git a/drivers/platform/chrome/cros_ec_chardev.c b/drivers/platform/chrome/cros_ec_chardev.c index a2c919caa220..002be3352100 100644 --- a/drivers/platform/chrome/cros_ec_chardev.c +++ b/drivers/platform/chrome/cros_ec_chardev.c @@ -162,7 +162,7 @@ static int cros_ec_chardev_open(struct inode *inode, struct file *filp) struct chardev_priv *priv; int ret; - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) return -ENOMEM; diff --git a/drivers/platform/chrome/wilco_ec/event.c b/drivers/platform/chrome/wilco_ec/event.c index e7f85d6f29f1..3a7ef8e0e0f4 100644 --- a/drivers/platform/chrome/wilco_ec/event.c +++ b/drivers/platform/chrome/wilco_ec/event.c @@ -457,7 +457,7 @@ static int event_device_add(struct acpi_device *adev) return error; } - dev_data = kzalloc_obj(*dev_data, GFP_KERNEL); + dev_data = kzalloc_obj(*dev_data); if (!dev_data) { error = -ENOMEM; goto free_minor; diff --git a/drivers/platform/chrome/wilco_ec/telemetry.c b/drivers/platform/chrome/wilco_ec/telemetry.c index 6375bbb6d6ce..cadb68fa0a40 100644 --- a/drivers/platform/chrome/wilco_ec/telemetry.c +++ b/drivers/platform/chrome/wilco_ec/telemetry.c @@ -248,7 +248,7 @@ static int telem_open(struct inode *inode, struct file *filp) get_device(&dev_data->dev); - sess_data = kzalloc_obj(*sess_data, GFP_KERNEL); + sess_data = kzalloc_obj(*sess_data); if (!sess_data) { atomic_set(&dev_data->available, 1); return -ENOMEM; @@ -370,7 +370,7 @@ static int telem_device_probe(struct platform_device *pdev) return error; } - dev_data = kzalloc_obj(*dev_data, GFP_KERNEL); + dev_data = kzalloc_obj(*dev_data); if (!dev_data) { ida_free(&telem_ida, minor); return -ENOMEM; |
