History

workqueue: use NR_STD_WORKER_POOLS instead of hardcoded value

use NR_STD_WORKER_POOLS for irq_work_fns[] array definition. NR_STD_WORKER_POOLS is also 2, but better to use MACRO. Initialization loop for_each_bh_worker_pool() also uses same MACRO.

Maninder Singh committed 7 months ago

Commit 034db4d1 parent c6890f31 file · +2 −2Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+2−2
@@ -7900,8 +7900,8 @@ void __init workqueue_init_early(void) · 7899 unmodified lines
7900{7900{
7901 struct wq_pod_type *pt = &wq_pod_types[WQ_AFFN_SYSTEM];7901 struct wq_pod_type *pt = &wq_pod_types[WQ_AFFN_SYSTEM];
7902 int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL };7902 int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL };
7903 void (*irq_work_fns[2])(struct irq_work *) = { bh_pool_kick_normal,7903 void (*irq_work_fns[NR_STD_WORKER_POOLS])(struct irq_work *) =
7904 bh_pool_kick_highpri };7904 { bh_pool_kick_normal, bh_pool_kick_highpri };
7905 int i, cpu;7905 int i, cpu;
7906 7906
7907 BUILD_BUG_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));7907 BUILD_BUG_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));