Commit f5c1ca77 authored by Shinya Kuribayashi's avatar Shinya Kuribayashi Committed by Ralf Baechle

MIPS: Loongson: irq.c: Misc cleanups

* Remove unnecessary 'if (int_status & (1 <<10))' statement
* s/if (foo != 0)/if (foo)/
* Remove unused 'inst_status &= ~(1 << i);' line
Signed-off-by: default avatarShinya Kuribayashi <skuribay@pobox.com>
To: wuzhangjin@gmail.com
CC: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1433/Acked-by: default avatarWu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 1f1f4e7d
...@@ -21,19 +21,16 @@ void bonito_irqdispatch(void) ...@@ -21,19 +21,16 @@ void bonito_irqdispatch(void)
/* workaround the IO dma problem: let cpu looping to allow DMA finish */ /* workaround the IO dma problem: let cpu looping to allow DMA finish */
int_status = LOONGSON_INTISR; int_status = LOONGSON_INTISR;
if (int_status & (1 << 10)) { while (int_status & (1 << 10)) {
while (int_status & (1 << 10)) { udelay(1);
udelay(1); int_status = LOONGSON_INTISR;
int_status = LOONGSON_INTISR;
}
} }
/* Get pending sources, masked by current enables */ /* Get pending sources, masked by current enables */
int_status = LOONGSON_INTISR & LOONGSON_INTEN; int_status = LOONGSON_INTISR & LOONGSON_INTEN;
if (int_status != 0) { if (int_status) {
i = __ffs(int_status); i = __ffs(int_status);
int_status &= ~(1 << i);
do_IRQ(LOONGSON_IRQ_BASE + i); do_IRQ(LOONGSON_IRQ_BASE + i);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment