Silly though it is, completions and wait_queue_heads use foo_ONSTACK (COMPLETION_INITIALIZER_ONSTACK, DECLARE_COMPLETION_ONSTACK, __WAIT_QUEUE_HEAD_INIT_ONSTACK and DECLARE_WAIT_QUEUE_HEAD_ONSTACK) so I guess workqueues should do the same thing. s/INIT_WORK_ON_STACK/INIT_WORK_ONSTACK/ s/INIT_DELAYED_WORK_ON_STACK/INIT_DELAYED_WORK_ONSTACK/
Unified · Split
| @@ -713,7 +713,7 @@ static int hpet_cpuhp_notify(struct notifier_block *n, · 712 unmodified lines | ||
| 713 | 713 | |
| 714 | 714 | switch (action & 0xf) { |
| 715 | 715 | case CPU_ONLINE: |
| 716 | − INIT_DELAYED_WORK_ON_STACK(&work.work, hpet_work); | |
| 716 | + INIT_DELAYED_WORK_ONSTACK(&work.work, hpet_work); | |
| 717 | 717 | init_completion(&work.complete); |
| 718 | 718 | /* FIXME: add schedule_work_on() */ |
| 719 | 719 | schedule_delayed_work_on(cpu, &work.work, 0); |
| @@ -747,7 +747,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) · 746 unmodified lines | ||
| 747 | 747 | .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done), |
| 748 | 748 | }; |
| 749 | 749 | |
| 750 | − INIT_WORK_ON_STACK(&c_idle.work, do_fork_idle); | |
| 750 | + INIT_WORK_ONSTACK(&c_idle.work, do_fork_idle); | |
| 751 | 751 | |
| 752 | 752 | alternatives_smp_switch(1); |
| 753 | 753 | |
| @@ -254,7 +254,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw, · 253 unmodified lines | ||
| 254 | 254 | * Issue the synchronous I/O from a different thread |
| 255 | 255 | * to avoid generic_make_request recursion. |
| 256 | 256 | */ |
| 257 | − INIT_WORK_ON_STACK(&req.work, do_metadata); | |
| 257 | + INIT_WORK_ONSTACK(&req.work, do_metadata); | |
| 258 | 258 | queue_work(ps->metadata_wq, &req.work); |
| 259 | 259 | flush_workqueue(ps->metadata_wq); |
| 260 | 260 | |
| @@ -190,7 +190,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } · 189 unmodified lines | ||
| 190 | 190 | __INIT_WORK((_work), (_func), 0); \ |
| 191 | 191 | } while (0) |
| 192 | 192 | |
| 193 | −#define INIT_WORK_ON_STACK(_work, _func) \ | |
| 193 | +#define INIT_WORK_ONSTACK(_work, _func) \ | |
| 194 | 194 | do { \ |
| 195 | 195 | __INIT_WORK((_work), (_func), 1); \ |
| 196 | 196 | } while (0) |
| @@ -201,9 +201,9 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } · 4 unmodified lines | ||
| 201 | 201 | init_timer(&(_work)->timer); \ |
| 202 | 202 | } while (0) |
| 203 | 203 | |
| 204 | −#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \ | |
| 204 | +#define INIT_DELAYED_WORK_ONSTACK(_work, _func) \ | |
| 205 | 205 | do { \ |
| 206 | − INIT_WORK_ON_STACK(&(_work)->work, (_func)); \ | |
| 206 | + INIT_WORK_ONSTACK(&(_work)->work, (_func)); \ | |
| 207 | 207 | init_timer_on_stack(&(_work)->timer); \ |
| 208 | 208 | } while (0) |
| 209 | 209 | |
| @@ -2064,7 +2064,7 @@ static void insert_wq_barrier(struct cpu_workqueue_struct *cwq, · 2063 unmodified lines | ||
| 2064 | 2064 | * checks and call back into the fixup functions where we |
| 2065 | 2065 | * might deadlock. |
| 2066 | 2066 | */ |
| 2067 | − INIT_WORK_ON_STACK(&barr->work, wq_barrier_func); | |
| 2067 | + INIT_WORK_ONSTACK(&barr->work, wq_barrier_func); | |
| 2068 | 2068 | __set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(&barr->work)); |
| 2069 | 2069 | init_completion(&barr->done); |
| 2070 | 2070 | |