Skip to content

Commit

Permalink
MIPS: Loongson: irq.c: Misc cleanups
Browse files Browse the repository at this point in the history
* Remove unnecessary 'if (int_status & (1 <<10))' statement
* s/if (foo != 0)/if (foo)/
* Remove unused 'inst_status &= ~(1 << i);' line

Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
To: wuzhangjin@gmail.com
CC: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1433/
Acked-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Shinya Kuribayashi authored and Ralf Baechle committed Aug 5, 2010
1 parent 1f1f4e7 commit f5c1ca7
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions arch/mips/loongson/common/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ void bonito_irqdispatch(void)

/* workaround the IO dma problem: let cpu looping to allow DMA finish */
int_status = LOONGSON_INTISR;
if (int_status & (1 << 10)) {
while (int_status & (1 << 10)) {
udelay(1);
int_status = LOONGSON_INTISR;
}
while (int_status & (1 << 10)) {
udelay(1);
int_status = LOONGSON_INTISR;
}

/* Get pending sources, masked by current enables */
int_status = LOONGSON_INTISR & LOONGSON_INTEN;

if (int_status != 0) {
if (int_status) {
i = __ffs(int_status);
int_status &= ~(1 << i);
do_IRQ(LOONGSON_IRQ_BASE + i);
}
}
Expand Down

0 comments on commit f5c1ca7

Please sign in to comment.