Skip to content

Commit 034db4d

Browse files
maninder42htejun
authored andcommitted
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. Signed-off-by: Maninder Singh <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent c6890f3 commit 034db4d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kernel/workqueue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7900,8 +7900,8 @@ void __init workqueue_init_early(void)
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));

0 commit comments

Comments
 (0)