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/dax | |
| 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/dax')
| -rw-r--r-- | drivers/dax/bus.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 3faaaa7a507b..c94c09622516 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -110,7 +110,7 @@ static ssize_t do_id_store(struct device_driver *drv, const char *buf, dax_id = __dax_match_id(dax_drv, buf); if (!dax_id) { if (action == ID_ADD) { - dax_id = kzalloc_obj(*dax_id, GFP_KERNEL); + dax_id = kzalloc_obj(*dax_id); if (dax_id) { strscpy(dax_id->dev_name, buf, DAX_NAME_LEN); list_add(&dax_id->list, &dax_drv->ids); @@ -650,7 +650,7 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id, || !IS_ALIGNED(range_len(range), align)) return NULL; - dax_region = kzalloc_obj(*dax_region, GFP_KERNEL); + dax_region = kzalloc_obj(*dax_region); if (!dax_region) return NULL; @@ -807,7 +807,7 @@ static int devm_register_dax_mapping(struct dev_dax *dev_dax, int range_id) "region disabled\n")) return -ENXIO; - mapping = kzalloc_obj(*mapping, GFP_KERNEL); + mapping = kzalloc_obj(*mapping); if (!mapping) return -ENOMEM; mapping->range_id = range_id; @@ -1427,7 +1427,7 @@ static struct dev_dax *__devm_create_dev_dax(struct dev_dax_data *data) struct device *dev; int rc; - dev_dax = kzalloc_obj(*dev_dax, GFP_KERNEL); + dev_dax = kzalloc_obj(*dev_dax); if (!dev_dax) return ERR_PTR(-ENOMEM); |
