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

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

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
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) · 214 unmodified lines
48464848 return 0;
48474849 }
48484850
4849−#ifdef CONFIG_SMP
4850−
48514851 struct work_for_cpu {
48524852 struct work_struct work;
48534853 long (*fn)(void *);