workqueue: Fold rebind_worker() within rebind_workers()
Subsystems (2)
PATCH 1/1 workqueue: Fold rebind_worker() within rebind_workers()
!CONFIG_SMP builds complain about rebind_worker() being unused. Its only user, rebind_workers() is indeed only defined for CONFIG_SMP, so just fold the two lines back up there.
Reported-by Stephen Rothwell <[email protected]>
Signed-off-by Valentin Schneider <[email protected]>
--- kernel/workqueue.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
kernel/workqueue.c +5 -8
@@ -1986,12 +1986,6 @@ static void unbind_worker(struct worker *worker)WARN_ON_ONCE (set_cpus_allowed_ptr (worker->task, cpu_possible_mask) <0 ); } -static void rebind_worker (struct worker *worker,struct worker_pool *pool) -{ -kthread_set_per_cpu (worker->task, pool->cpu); -WARN_ON_ONCE (set_cpus_allowed_ptr (worker->task, pool->attrs->cpumask) <0 ); -} -static void wake_dying_workers (struct list_head *cull_list) {struct worker *worker, *tmp;
@@ -5149,8 +5143,11 @@ static void rebind_workers(struct worker_pool *pool)* of all workers first and then clear UNBOUND. As we're called * from CPU_ONLINE, the following shouldn't fail. */ -for_each_pool_worker (worker, pool) -rebind_worker (worker, pool); +for_each_pool_worker (worker, pool) { +kthread_set_per_cpu (worker->task, pool->cpu); +WARN_ON_ONCE (set_cpus_allowed_ptr (worker->task, + pool->attrs->cpumask) <0 ); + }raw_spin_lock_irq (&pool->lock);
Signature · 1 line
2.31.1
Quoted 7 lines · Valentin Schneider
!CONFIG_SMP builds complain about
rebind_worker()being unused. Its only user,rebind_workers()is indeed only defined forCONFIG_SMP, so just fold the two lines back up there.Reported-by Stephen Rothwell <[email protected]>Signed-off-by Valentin Schneider <[email protected]>
Applied to wq/for-6.3.
Thanks.
Signature · 1 line
tejun