Skip to content

Commit c63a2e5

Browse files
valschneiderhtejun
authored andcommitted
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. Link: http://lore.kernel.org/r/[email protected] Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Valentin Schneider <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent e02b931 commit c63a2e5

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

kernel/workqueue.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,12 +1990,6 @@ static void unbind_worker(struct worker *worker)
19901990
WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, cpu_possible_mask) < 0);
19911991
}
19921992

1993-
static void rebind_worker(struct worker *worker, struct worker_pool *pool)
1994-
{
1995-
kthread_set_per_cpu(worker->task, pool->cpu);
1996-
WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, pool->attrs->cpumask) < 0);
1997-
}
1998-
19991993
static void wake_dying_workers(struct list_head *cull_list)
20001994
{
20011995
struct worker *worker, *tmp;
@@ -5192,8 +5186,11 @@ static void rebind_workers(struct worker_pool *pool)
51925186
* of all workers first and then clear UNBOUND. As we're called
51935187
* from CPU_ONLINE, the following shouldn't fail.
51945188
*/
5195-
for_each_pool_worker(worker, pool)
5196-
rebind_worker(worker, pool);
5189+
for_each_pool_worker(worker, pool) {
5190+
kthread_set_per_cpu(worker->task, pool->cpu);
5191+
WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task,
5192+
pool->attrs->cpumask) < 0);
5193+
}
51975194

51985195
raw_spin_lock_irq(&pool->lock);
51995196

0 commit comments

Comments
 (0)