summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/regulator
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlinux-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/regulator')
-rw-r--r--drivers/regulator/core.c14
-rw-r--r--drivers/regulator/fixed-helper.c2
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 386304bc200c..2286bdf6edcb 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1855,7 +1855,7 @@ static int set_consumer_device_supply(struct regulator_dev *rdev,
else
has_dev = 0;
- new_node = kzalloc_obj(struct regulator_map, GFP_KERNEL);
+ new_node = kzalloc_obj(struct regulator_map);
if (new_node == NULL)
return -ENOMEM;
@@ -2021,7 +2021,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
return NULL;
}
- regulator = kzalloc_obj(*regulator, GFP_KERNEL);
+ regulator = kzalloc_obj(*regulator);
if (regulator == NULL) {
kfree_const(supply_name);
return NULL;
@@ -2701,7 +2701,7 @@ int regulator_register_supply_alias(struct device *dev, const char *id,
struct regulator_supply_alias *map;
struct regulator_supply_alias *new_map;
- new_map = kzalloc_obj(struct regulator_supply_alias, GFP_KERNEL);
+ new_map = kzalloc_obj(struct regulator_supply_alias);
if (!new_map)
return -ENOMEM;
@@ -2825,7 +2825,7 @@ static int regulator_ena_gpio_request(struct regulator_dev *rdev,
struct gpio_desc *gpiod;
gpiod = config->ena_gpiod;
- new_pin = kzalloc_obj(*new_pin, GFP_KERNEL);
+ new_pin = kzalloc_obj(*new_pin);
mutex_lock(&regulator_list_mutex);
@@ -5913,7 +5913,7 @@ static int regulator_init_coupling(struct regulator_dev *rdev)
else
n_phandles = of_get_n_coupled(rdev);
- coupled = kzalloc_objs(*coupled, n_phandles + 1, GFP_KERNEL);
+ coupled = kzalloc_objs(*coupled, n_phandles + 1);
if (!coupled)
return -ENOMEM;
@@ -6034,7 +6034,7 @@ regulator_register(struct device *dev,
goto rinse;
}
- rdev = kzalloc_obj(struct regulator_dev, GFP_KERNEL);
+ rdev = kzalloc_obj(struct regulator_dev);
if (rdev == NULL) {
ret = -ENOMEM;
goto rinse;
@@ -6117,7 +6117,7 @@ regulator_register(struct device *dev,
sizeof(*rdev->constraints),
GFP_KERNEL);
else
- rdev->constraints = kzalloc_obj(*rdev->constraints, GFP_KERNEL);
+ rdev->constraints = kzalloc_obj(*rdev->constraints);
if (!rdev->constraints) {
ret = -ENOMEM;
goto wash;
diff --git a/drivers/regulator/fixed-helper.c b/drivers/regulator/fixed-helper.c
index 186a05b00733..ba5551ac034d 100644
--- a/drivers/regulator/fixed-helper.c
+++ b/drivers/regulator/fixed-helper.c
@@ -34,7 +34,7 @@ struct platform_device *regulator_register_always_on(int id, const char *name,
{
struct fixed_regulator_data *data;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return NULL;