History

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]

Mathieu Malaterre committed 8 years ago

Commit 66448bc1 parent 197f6ac1 file · +2 −2Browse files

Unified · Split

kernel/workqueue.c+2−2
@@ -4626,6 +4626,8 @@ void wq_worker_comm(char *buf, size_t size, struct task_struct *task) · 4625 unmodified lines
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) · 214 unmodified lines
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 *);