aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorMathieu Malaterre <malat@debian.org>2018-05-22 15:47:32 -0400
committerTejun Heo <tj@kernel.org>2018-05-23 14:16:58 -0400
commit66448bc274cadedb71fda7d914e7c29d8dead217 (patch)
treea995effcf0fa2a7a5b08381cca9e6a337ab86b6b /kernel/workqueue.c
parent197f6accacdaf9a0cf4da3c4ac8dd788633c0e38 (diff)
workqueue: move function definitions within CONFIG_SMP block
In commit 7ee681b25284 ("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 <malat@debian.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 60d6fd2636f3..7ea75529eabb 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4626,6 +4626,8 @@ void wq_worker_comm(char *buf, size_t size, struct task_struct *task)
4626 mutex_unlock(&wq_pool_attach_mutex); 4626 mutex_unlock(&wq_pool_attach_mutex);
4627} 4627}
4628 4628
4629#ifdef CONFIG_SMP
4630
4629/* 4631/*
4630 * CPU hotplug. 4632 * CPU hotplug.
4631 * 4633 *
@@ -4846,8 +4848,6 @@ int workqueue_offline_cpu(unsigned int cpu)
4846 return 0; 4848 return 0;
4847} 4849}
4848 4850
4849#ifdef CONFIG_SMP
4850
4851struct work_for_cpu { 4851struct work_for_cpu {
4852 struct work_struct work; 4852 struct work_struct work;
4853 long (*fn)(void *); 4853 long (*fn)(void *);