diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-22 03:37:42 +0300 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-22 04:09:51 +0300 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /arch/sh | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.xz | |
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 'arch/sh')
| -rw-r--r-- | arch/sh/drivers/dma/dmabrg.c | 2 | ||||
| -rw-r--r-- | arch/sh/drivers/heartbeat.c | 2 | ||||
| -rw-r--r-- | arch/sh/drivers/push-switch.c | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/sq.c | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/dwarf.c | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/arch/sh/drivers/dma/dmabrg.c b/arch/sh/drivers/dma/dmabrg.c index 72f90f0c799e..3778c6a363ec 100644 --- a/arch/sh/drivers/dma/dmabrg.c +++ b/arch/sh/drivers/dma/dmabrg.c @@ -153,7 +153,7 @@ static int __init dmabrg_init(void) unsigned long or; int ret; - dmabrg_handlers = kzalloc_objs(struct dmabrg_handler, 10, GFP_KERNEL); + dmabrg_handlers = kzalloc_objs(struct dmabrg_handler, 10); if (!dmabrg_handlers) return -ENOMEM; diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c index aae320cef692..e55ef3c16a0f 100644 --- a/arch/sh/drivers/heartbeat.c +++ b/arch/sh/drivers/heartbeat.c @@ -91,7 +91,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev) if (pdev->dev.platform_data) { hd = pdev->dev.platform_data; } else { - hd = kzalloc_obj(struct heartbeat_data, GFP_KERNEL); + hd = kzalloc_obj(struct heartbeat_data); if (unlikely(!hd)) return -ENOMEM; } diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c index 492315fc96fd..a39e2edd4dcb 100644 --- a/arch/sh/drivers/push-switch.c +++ b/arch/sh/drivers/push-switch.c @@ -46,7 +46,7 @@ static int switch_drv_probe(struct platform_device *pdev) struct push_switch *psw; int ret, irq; - psw = kzalloc_obj(struct push_switch, GFP_KERNEL); + psw = kzalloc_obj(struct push_switch); if (unlikely(!psw)) return -ENOMEM; diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 2a465c440168..908a8e09113b 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -342,7 +342,7 @@ static int sq_dev_add(struct device *dev, struct subsys_interface *sif) struct kobject *kobj; int error; - sq_kobject[cpu] = kzalloc_obj(struct kobject, GFP_KERNEL); + sq_kobject[cpu] = kzalloc_obj(struct kobject); if (unlikely(!sq_kobject[cpu])) return -ENOMEM; diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index 46df80942418..edcf3b172284 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c @@ -741,7 +741,7 @@ static int dwarf_parse_cie(void *entry, void *p, unsigned long len, unsigned long flags; int count; - cie = kzalloc_obj(*cie, GFP_KERNEL); + cie = kzalloc_obj(*cie); if (!cie) return -ENOMEM; @@ -874,7 +874,7 @@ static int dwarf_parse_fde(void *entry, u32 entry_type, int count; void *p = start; - fde = kzalloc_obj(*fde, GFP_KERNEL); + fde = kzalloc_obj(*fde); if (!fde) return -ENOMEM; |
