summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/system-as3525.c4
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[] =
static void UIRQ(void)
{
- unsigned int irq_no = 0;
bool masked = false;
int status = VIC_IRQ_STATUS;
if(status == 0)
@@ -99,8 +98,7 @@ static void UIRQ(void)
if(status == 0)
panicf("Unhandled IRQ (source unknown!)");
- while((status >>= 1))
- irq_no++;
+ unsigned irq_no = find_first_set_bit(status);
panicf("Unhandled %smasked IRQ %02X: %s (status 0x%8X)",
masked ? "" : "no", irq_no, irqname[irq_no], status);