diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 60d6fd2636f30b3a3d0f322146253e071ea547d9..7ea75529eabb7123984a41b0f4c0a0f5ee25f3c8 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)
 	mutex_unlock(&wq_pool_attach_mutex);
 }
 
+#ifdef CONFIG_SMP
+
 /*
  * CPU hotplug.
  *
@@ -4846,8 +4848,6 @@ int workqueue_offline_cpu(unsigned int cpu)
 	return 0;
 }
 
-#ifdef CONFIG_SMP
-
 struct work_for_cpu {
 	struct work_struct work;
 	long (*fn)(void *);