From: Shinya Kuribayashi <skuribay@pobox.com>
To: wuzhangjin@gmail.com
Cc: linux-mips@linux-mips.org
Subject: [PATCH] MIPS: Loongson: irq.c: Misc cleanups
Date: Sun, 27 Jun 2010 22:52:01 +0900 [thread overview]
Message-ID: <4C275781.8000904@pobox.com> (raw)
* 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
next reply other threads:[~2010-06-27 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-27 13:52 Shinya Kuribayashi [this message]
2010-06-28 1:15 ` [PATCH] MIPS: Loongson: irq.c: Misc cleanups wu zhangjin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C275781.8000904@pobox.com \
--to=skuribay@pobox.com \
--cc=linux-mips@linux-mips.org \
--cc=wuzhangjin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox