diff options
Diffstat (limited to 'firmware/target/arm/as3525/system-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 80804d41da..f215300f75 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c | |||
@@ -87,7 +87,6 @@ static const char * const irqname[] = | |||
87 | 87 | ||
88 | static void UIRQ(void) | 88 | static void UIRQ(void) |
89 | { | 89 | { |
90 | unsigned int irq_no = 0; | ||
91 | bool masked = false; | 90 | bool masked = false; |
92 | int status = VIC_IRQ_STATUS; | 91 | int status = VIC_IRQ_STATUS; |
93 | if(status == 0) | 92 | if(status == 0) |
@@ -99,8 +98,7 @@ static void UIRQ(void) | |||
99 | if(status == 0) | 98 | if(status == 0) |
100 | panicf("Unhandled IRQ (source unknown!)"); | 99 | panicf("Unhandled IRQ (source unknown!)"); |
101 | 100 | ||
102 | while((status >>= 1)) | 101 | unsigned irq_no = find_first_set_bit(status); |
103 | irq_no++; | ||
104 | 102 | ||
105 | panicf("Unhandled %smasked IRQ %02X: %s (status 0x%8X)", | 103 | panicf("Unhandled %smasked IRQ %02X: %s (status 0x%8X)", |
106 | masked ? "" : "no", irq_no, irqname[irq_no], status); | 104 | masked ? "" : "no", irq_no, irqname[irq_no], status); |