mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 15:33:28 +00:00
MIPS: smp-cps: Fix potentially uninitialised value of core
Turning on DEBUG in smp-cps.c, or compiling the kernel with
CONFIG_DYNAMIC_DEBUG enabled results the build error:
arch/mips/kernel/smp-cps.c: In function 'play_dead':
./include/linux/dynamic_debug.h:126:3: error: 'core' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
Fix this by always initialising the variable.
Fixes: 0d2808f338 ("MIPS: smp-cps: Add support for CPU hotplug of MIPSr6 processors")
Signed-off-by: Matt Redfearn <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/15848/
Signed-off-by: Ralf Baechle <[email protected]>
This commit is contained in:
committed by
Ralf Baechle
parent
ec62a3bd84
commit
bac06cf0fb
@@ -422,13 +422,12 @@ void play_dead(void)
|
||||
local_irq_disable();
|
||||
idle_task_exit();
|
||||
cpu = smp_processor_id();
|
||||
core = cpu_data[cpu].core;
|
||||
cpu_death = CPU_DEATH_POWER;
|
||||
|
||||
pr_debug("CPU%d going offline\n", cpu);
|
||||
|
||||
if (cpu_has_mipsmt || cpu_has_vp) {
|
||||
core = cpu_data[cpu].core;
|
||||
|
||||
/* Look for another online VPE within the core */
|
||||
for_each_online_cpu(cpu_death_sibling) {
|
||||
if (cpu_data[cpu_death_sibling].core != core)
|
||||
|
||||
Reference in New Issue
Block a user