workqueue: use NR_STD_WORKER_POOLS instead of hardcoded value
A message that is not in the archive (sent off-list or not yet received): CGME20260407034221epcas5p333b582f91ee9c72f55cba792b750aa1f@epcas5p3.samsung.com
PATCH 1/1 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]>
--- kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/workqueue.c +1 -1
@@ -7932,7 +7932,7 @@ void __init workqueue_init_early(void) {struct wq_pod_type *pt = &wq_pod_types[WQ_AFFN_SYSTEM ];int std_nice[NR_STD_WORKER_POOLS ] = {0 ,HIGHPRI_NICE_LEVEL }; -void (*irq_work_fns[2 ])(struct irq_work *) = { bh_pool_kick_normal, +void (*irq_work_fns[NR_STD_WORKER_POOLS ])(struct irq_work *) = { bh_pool_kick_normal, bh_pool_kick_highpri };int i, cpu;
Signature · 1 line
2.34.1
Hello,
Quoted 3 lines · Maninder Singh
use
NR_STD_WORKER_POOLSfor irq_work_fns[] array definition.NR_STD_WORKER_POOLSis also 2, but better to use MACRO. Initialization loopfor_each_bh_worker_pool()also uses same MACRO.
Applied to wq/for-7.1 with a small formatting tweak so the longer declaration doesn't leave the initializer misaligned:
void (*irq_work_fns[NR_STD_WORKER_POOLS])(struct irq_work *) =
{ bh_pool_kick_normal, bh_pool_kick_highpri };Thanks.
--
tejun