Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c6f7e43 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

stop_machine: Move local variable closer to the usage site in cpu_stop_cpu_callback()



This addresses the following compiler warning:

 kernel/stop_machine.c: In function 'cpu_stop_cpu_callback':
 kernel/stop_machine.c:297: warning: unused variable 'work'

Cc: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <tip-3fc1f1e2@git.kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a93d2f17
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -294,7 +294,6 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
	unsigned int cpu = (unsigned long)hcpu;
	unsigned int cpu = (unsigned long)hcpu;
	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
	struct cpu_stop_work *work;
	struct task_struct *p;
	struct task_struct *p;


	switch (action & ~CPU_TASKS_FROZEN) {
	switch (action & ~CPU_TASKS_FROZEN) {
@@ -323,6 +322,9 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
#ifdef CONFIG_HOTPLUG_CPU
#ifdef CONFIG_HOTPLUG_CPU
	case CPU_UP_CANCELED:
	case CPU_UP_CANCELED:
	case CPU_DEAD:
	case CPU_DEAD:
	{
		struct cpu_stop_work *work;

		/* kill the stopper */
		/* kill the stopper */
		kthread_stop(stopper->thread);
		kthread_stop(stopper->thread);
		/* drain remaining works */
		/* drain remaining works */
@@ -335,6 +337,7 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
		put_task_struct(stopper->thread);
		put_task_struct(stopper->thread);
		stopper->thread = NULL;
		stopper->thread = NULL;
		break;
		break;
	}
#endif
#endif
	}
	}