From f5c1ca77a3b2f9b424c4f39bd71143d0ac308924 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sun, 27 Jun 2010 22:52:01 +0900 Subject: [PATCH] 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: Shinya Kuribayashi To: wuzhangjin@gmail.com CC: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1433/ Acked-by: Wu Zhangjin Signed-off-by: Ralf Baechle --- arch/mips/loongson/common/irq.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/mips/loongson/common/irq.c b/arch/mips/loongson/common/irq.c index 20e732831978..25a11df03482 100644 --- a/arch/mips/loongson/common/irq.c +++ b/arch/mips/loongson/common/irq.c @@ -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); } } -- 2.20.1