Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] Yosemite: Fix warning.

arch/mips/pmc-sierra/yosemite/smp.c: In function 'titan_mailbox_irq':
arch/mips/pmc-sierra/yosemite/smp.c:112: warning: 'status' may be used uninitialized in this function

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+11 -6
+11 -6
arch/mips/pmc-sierra/yosemite/smp.c
··· 111 111 int cpu = smp_processor_id(); 112 112 unsigned long status; 113 113 114 - if (cpu == 0) { 114 + switch (cpu) { 115 + case 0: 115 116 status = OCD_READ(RM9000x2_OCD_INTP0STATUS3); 116 117 OCD_WRITE(RM9000x2_OCD_INTP0CLEAR3, status); 117 - } 118 118 119 - if (cpu == 1) { 119 + if (status & 0x2) 120 + smp_call_function_interrupt(); 121 + break; 122 + 123 + case 1: 120 124 status = OCD_READ(RM9000x2_OCD_INTP1STATUS3); 121 125 OCD_WRITE(RM9000x2_OCD_INTP1CLEAR3, status); 122 - } 123 126 124 - if (status & 0x2) 125 - smp_call_function_interrupt(); 127 + if (status & 0x2) 128 + smp_call_function_interrupt(); 129 + break; 130 + } 126 131 } 127 132 128 133 /*