mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cpu/hotplug: Remove unused but set variable in _cpu_down()
@ 2017-01-17 14:35 Tobias Klauser
  2017-01-18 10:57 ` [tip:smp/urgent] " tip-bot for Tobias Klauser
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2017-01-17 14:35 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Sebastian Andrzej Siewior, Peter Zijlstra, rt, linux-kernel

After commit 530e9b76ae8f ("cpu/hotplug: Remove obsolete cpu hotplug
register/unregister functions"), the variable hasdied in _cpu_down() is
set but no longer read, leading to the following GCC warning when
building with 'make W=1':

  kernel/cpu.c:767:7: warning: variable ‘hasdied’ set but not used [-Wunused-but-set-variable]

Fix it by removing the variable.

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 kernel/cpu.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index f75c4d031eeb..f6b166ac7873 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -764,7 +764,6 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
 {
 	struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
 	int prev_state, ret = 0;
-	bool hasdied = false;
 
 	if (num_online_cpus() == 1)
 		return -EBUSY;
@@ -809,7 +808,6 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
 		cpuhp_kick_ap_work(cpu);
 	}
 
-	hasdied = prev_state != st->state && st->state == CPUHP_OFFLINE;
 out:
 	cpu_hotplug_done();
 	return ret;
-- 
2.11.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-18 11:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-17 14:35 [PATCH] cpu/hotplug: Remove unused but set variable in _cpu_down() Tobias Klauser
2017-01-18 10:57 ` [tip:smp/urgent] " tip-bot for Tobias Klauser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome