Skip to content

Commit 66448bc

Browse files
malaterrehtejun
authored andcommitted
workqueue: move function definitions within CONFIG_SMP block
In commit 7ee681b ("workqueue: Convert to state machine callbacks"), three new function definitions were added: ‘workqueue_prepare_cpu’, ‘workqueue_online_cpu’ and ‘workqueue_offline_cpu’. Move these function definitions within a CONFIG_SMP block since they are not used outside of it. This will match function declarations in header <include/linux/workqueue.h>, and silence the following gcc warning (W=1): kernel/workqueue.c:4743:5: warning: no previous prototype for ‘workqueue_prepare_cpu’ [-Wmissing-prototypes] kernel/workqueue.c:4756:5: warning: no previous prototype for ‘workqueue_online_cpu’ [-Wmissing-prototypes] kernel/workqueue.c:4783:5: warning: no previous prototype for ‘workqueue_offline_cpu’ [-Wmissing-prototypes] Signed-off-by: Mathieu Malaterre <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 197f6ac commit 66448bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/workqueue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4626,6 +4626,8 @@ void wq_worker_comm(char *buf, size_t size, struct task_struct *task)
46264626
mutex_unlock(&wq_pool_attach_mutex);
46274627
}
46284628

4629+
#ifdef CONFIG_SMP
4630+
46294631
/*
46304632
* CPU hotplug.
46314633
*
@@ -4846,8 +4848,6 @@ int workqueue_offline_cpu(unsigned int cpu)
48464848
return 0;
48474849
}
48484850

4849-
#ifdef CONFIG_SMP
4850-
48514851
struct work_for_cpu {
48524852
struct work_struct work;
48534853
long (*fn)(void *);

0 commit comments

Comments
 (0)