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
79007900 {
79017901 struct wq_pod_type *pt = &wq_pod_types[WQ_AFFN_SYSTEM];
79027902 int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL };
7903− void (*irq_work_fns[2])(struct irq_work *) = { bh_pool_kick_normal,
7904− bh_pool_kick_highpri };
7903+ void (*irq_work_fns[NR_STD_WORKER_POOLS])(struct irq_work *) =
7904+ { bh_pool_kick_normal, bh_pool_kick_highpri };
79057905 int i, cpu;
79067906
79077907 BUILD_BUG_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));