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 /fs/binfmt_elf_fdpic.c | |
| 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 'fs/binfmt_elf_fdpic.c')
| -rw-r--r-- | fs/binfmt_elf_fdpic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index cee0871b0164..526e048e2956 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c @@ -1391,7 +1391,7 @@ static struct elf_thread_status *elf_dump_thread_status(long signr, struct task_ struct elf_thread_status *t; int i, ret; - t = kzalloc_obj(struct elf_thread_status, GFP_KERNEL); + t = kzalloc_obj(struct elf_thread_status); if (!t) return t; @@ -1486,10 +1486,10 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) struct elf_thread_status *tmp; /* alloc memory for large data structures: too large to be on stack */ - elf = kmalloc_obj(*elf, GFP_KERNEL); + elf = kmalloc_obj(*elf); if (!elf) goto end_coredump; - psinfo = kmalloc_obj(*psinfo, GFP_KERNEL); + psinfo = kmalloc_obj(*psinfo); if (!psinfo) goto end_coredump; @@ -1547,7 +1547,7 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) offset += segs * sizeof(struct elf_phdr); /* Program headers */ /* Write notes phdr entry */ - phdr4note = kmalloc_obj(*phdr4note, GFP_KERNEL); + phdr4note = kmalloc_obj(*phdr4note); if (!phdr4note) goto end_coredump; @@ -1562,7 +1562,7 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm) e_shoff = offset; if (e_phnum == PN_XNUM) { - shdr4extnum = kmalloc_obj(*shdr4extnum, GFP_KERNEL); + shdr4extnum = kmalloc_obj(*shdr4extnum); if (!shdr4extnum) goto end_coredump; fill_extnum_info(elf, shdr4extnum, e_shoff, segs); |
