* [PATCH] MIPS: Loongson: irq.c: Misc cleanups
@ 2010-06-27 13:52 Shinya Kuribayashi
2010-06-28 1:15 ` wu zhangjin
0 siblings, 1 reply; 2+ messages in thread
From: Shinya Kuribayashi @ 2010-06-27 13:52 UTC (permalink / raw)
To: wuzhangjin; +Cc: linux-mips
* 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>
---
Noticed while I'm reworking on interrupt code for EMMA2RH.
This is not for inclusion, but just for letting Wu-san know.
arch/mips/loongson/common/irq.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/arch/mips/loongson/common/irq.c b/arch/mips/loongson/common/irq.c
index 20e7328..25a11df 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);
}
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] MIPS: Loongson: irq.c: Misc cleanups
2010-06-27 13:52 [PATCH] MIPS: Loongson: irq.c: Misc cleanups Shinya Kuribayashi
@ 2010-06-28 1:15 ` wu zhangjin
0 siblings, 0 replies; 2+ messages in thread
From: wu zhangjin @ 2010-06-28 1:15 UTC (permalink / raw)
To: Shinya Kuribayashi; +Cc: linux-mips
Hi,
Looks find to me, thanks!
Acked-by: Wu Zhangjin <wuzhangjin@gmail.com>
On Sun, Jun 27, 2010 at 9:52 PM, Shinya Kuribayashi <skuribay@pobox.com> wrote:
> * 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>
> ---
> Noticed while I'm reworking on interrupt code for EMMA2RH.
> This is not for inclusion, but just for letting Wu-san know.
>
> arch/mips/loongson/common/irq.c | 11 ++++-------
> 1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/arch/mips/loongson/common/irq.c b/arch/mips/loongson/common/irq.c
> index 20e7328..25a11df 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);
> }
> }
> --
> 1.7.1
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-28 1:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-27 13:52 [PATCH] MIPS: Loongson: irq.c: Misc cleanups Shinya Kuribayashi
2010-06-28 1:15 ` wu zhangjin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox