summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/regmap.c
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/base/regmap/regmap.c
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlinux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
linux-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/regmap/regmap.c')
-rw-r--r--drivers/base/regmap/regmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 443dc31f69d3..607c1246d994 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -689,7 +689,7 @@ struct regmap *__regmap_init(struct device *dev,
if (!config)
goto err;
- map = kzalloc_obj(*map, GFP_KERNEL);
+ map = kzalloc_obj(*map);
if (map == NULL) {
ret = -ENOMEM;
goto err;
@@ -1117,7 +1117,7 @@ skip_format_initialization:
}
}
- new = kzalloc_obj(*new, GFP_KERNEL);
+ new = kzalloc_obj(*new);
if (new == NULL) {
ret = -ENOMEM;
goto err_range;
@@ -1274,7 +1274,7 @@ int regmap_field_bulk_alloc(struct regmap *regmap,
struct regmap_field *rf;
int i;
- rf = kzalloc_objs(*rf, num_fields, GFP_KERNEL);
+ rf = kzalloc_objs(*rf, num_fields);
if (!rf)
return -ENOMEM;
@@ -1384,7 +1384,7 @@ EXPORT_SYMBOL_GPL(devm_regmap_field_free);
struct regmap_field *regmap_field_alloc(struct regmap *regmap,
struct reg_field reg_field)
{
- struct regmap_field *rm_field = kzalloc_obj(*rm_field, GFP_KERNEL);
+ struct regmap_field *rm_field = kzalloc_obj(*rm_field);
if (!rm_field)
return ERR_PTR(-ENOMEM);