diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 20:03:00 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 20:03:00 -0800 |
| commit | 32a92f8c89326985e05dce8b22d3f0aa07a3e1bd (patch) | |
| tree | 65f84985b9ed2d5cf3c5243aca78d9428e25c312 /kernel/rcu | |
| parent | 323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff) | |
| download | linux-next-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.tar.gz linux-next-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.zip | |
Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
This converts some of the visually simpler cases that have been split
over multiple lines. I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.
Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script. I probably had made it a bit _too_ trivial.
So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.
The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/rcu')
| -rw-r--r-- | kernel/rcu/rcuscale.c | 6 | ||||
| -rw-r--r-- | kernel/rcu/rcutorture.c | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c index 6c1acf9ba69b..16adcbecf875 100644 --- a/kernel/rcu/rcuscale.c +++ b/kernel/rcu/rcuscale.c @@ -755,8 +755,7 @@ kfree_scale_thread(void *arg) } for (i = 0; i < kfree_alloc_num; i++) { - alloc_ptr = kzalloc_objs(struct kfree_obj, kfree_mult, - GFP_KERNEL); + alloc_ptr = kzalloc_objs(struct kfree_obj, kfree_mult); if (!alloc_ptr) return -ENOMEM; @@ -1146,8 +1145,7 @@ rcu_scale_init(void) schedule_timeout_uninterruptible(1); writer_tasks = kzalloc_objs(writer_tasks[0], nrealwriters); writer_durations = kcalloc(nrealwriters, sizeof(*writer_durations), GFP_KERNEL); - writer_n_durations = kzalloc_objs(*writer_n_durations, nrealwriters, - GFP_KERNEL); + writer_n_durations = kzalloc_objs(*writer_n_durations, nrealwriters); writer_done = kzalloc_objs(writer_done[0], nrealwriters); if (gp_async) { if (gp_async_max <= 0) { diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 197cea4d1f26..9279bb57586b 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -4592,8 +4592,7 @@ rcu_torture_init(void) if (WARN_ON(nocbs_toggle < 0)) nocbs_toggle = HZ; if (nrealnocbers > 0) { - nocb_tasks = kzalloc_objs(nocb_tasks[0], nrealnocbers, - GFP_KERNEL); + nocb_tasks = kzalloc_objs(nocb_tasks[0], nrealnocbers); if (nocb_tasks == NULL) { TOROUT_ERRSTRING("out of memory"); firsterr = -ENOMEM; |
