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/reset | |
| 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/reset')
| -rw-r--r-- | drivers/reset/core.c | 6 | ||||
| -rw-r--r-- | drivers/reset/reset-npcm.c | 2 | ||||
| -rw-r--r-- | drivers/reset/reset-socfpga.c | 2 | ||||
| -rw-r--r-- | drivers/reset/reset-sunxi.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c index c224e42e0f6c..ae7996f677bd 100644 --- a/drivers/reset/core.c +++ b/drivers/reset/core.c @@ -778,7 +778,7 @@ __reset_control_get_internal(struct reset_controller_dev *rcdev, } } - rstc = kzalloc_obj(*rstc, GFP_KERNEL); + rstc = kzalloc_obj(*rstc); if (!rstc) return ERR_PTR(-ENOMEM); @@ -836,7 +836,7 @@ static int reset_add_gpio_aux_device(struct device *parent, struct auxiliary_device *adev; int ret; - adev = kzalloc_obj(*adev, GFP_KERNEL); + adev = kzalloc_obj(*adev); if (!adev) return -ENOMEM; @@ -931,7 +931,7 @@ static int __reset_add_reset_gpio_device(const struct of_phandle_args *args) return id; /* Not freed on success, because it is persisent subsystem data. */ - rgpio_dev = kzalloc_obj(*rgpio_dev, GFP_KERNEL); + rgpio_dev = kzalloc_obj(*rgpio_dev); if (!rgpio_dev) { ret = -ENOMEM; goto err_ida_free; diff --git a/drivers/reset/reset-npcm.c b/drivers/reset/reset-npcm.c index c28cb4632883..4070a4b6663f 100644 --- a/drivers/reset/reset-npcm.c +++ b/drivers/reset/reset-npcm.c @@ -399,7 +399,7 @@ static struct auxiliary_device *npcm_clock_adev_alloc(struct npcm_rc_data *rst_d struct auxiliary_device *adev; int ret; - rdev = kzalloc_obj(*rdev, GFP_KERNEL); + rdev = kzalloc_obj(*rdev); if (!rdev) return ERR_PTR(-ENOMEM); diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index a18cc81e0efa..da208270b787 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -27,7 +27,7 @@ static int a10_reset_init(struct device_node *np) int ret; u32 reg_offset = 0x10; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c index b88d1d001ec3..2544de6576e4 100644 --- a/drivers/reset/reset-sunxi.c +++ b/drivers/reset/reset-sunxi.c @@ -27,7 +27,7 @@ static int sunxi_reset_init(struct device_node *np) resource_size_t size; int ret; - data = kzalloc_obj(*data, GFP_KERNEL); + data = kzalloc_obj(*data); if (!data) return -ENOMEM; |
