summaryrefslogtreecommitdiffstats
path: root/arch/mips/pmc-sierra
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-07-30 12:08:35 +0200
committerRalf Baechle <ralf@linux-mips.org>2007-07-31 22:35:32 +0200
commite9c227f9ecc0ddbaa5d4d197f7ee658aa4fee67f (patch)
tree265dbf270c9dea587e4e26a37f9f6c182329b555 /arch/mips/pmc-sierra
parent[MIPS] PMON: Fix cpustart declaration. (diff)
downloadlinux-e9c227f9ecc0ddbaa5d4d197f7ee658aa4fee67f.tar.xz
linux-e9c227f9ecc0ddbaa5d4d197f7ee658aa4fee67f.zip
[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>
Diffstat (limited to 'arch/mips/pmc-sierra')
-rw-r--r--arch/mips/pmc-sierra/yosemite/smp.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c
index 4f830f99a874..1c852d6a7654 100644
--- a/arch/mips/pmc-sierra/yosemite/smp.c
+++ b/arch/mips/pmc-sierra/yosemite/smp.c
@@ -111,18 +111,23 @@ void titan_mailbox_irq(void)
int cpu = smp_processor_id();
unsigned long status;
- if (cpu == 0) {
+ switch (cpu) {
+ case 0:
status = OCD_READ(RM9000x2_OCD_INTP0STATUS3);
OCD_WRITE(RM9000x2_OCD_INTP0CLEAR3, status);
- }
- if (cpu == 1) {
+ if (status & 0x2)
+ smp_call_function_interrupt();
+ break;
+
+ case 1:
status = OCD_READ(RM9000x2_OCD_INTP1STATUS3);
OCD_WRITE(RM9000x2_OCD_INTP1CLEAR3, status);
- }
- if (status & 0x2)
- smp_call_function_interrupt();
+ if (status & 0x2)
+ smp_call_function_interrupt();
+ break;
+ }
}
/*