From: Wang Chen <wangchen@cn.fujitsu.com>
To: linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: [PATCH 1/2 -tip] irq: remove unneeded desc->chip->ack check
Date: Fri, 26 Dec 2008 17:13:15 +0800 [thread overview]
Message-ID: <4954A02B.4060606@cn.fujitsu.com> (raw)
desc->chip->ack is initialized to ack_bad().
It will not be NULL.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
kernel/irq/chip.c | 3 +--
kernel/irq/handle.c | 14 +++++---------
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index f63c706..b929803 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -530,8 +530,7 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
kstat_incr_irqs_this_cpu(irq, desc);
- if (desc->chip->ack)
- desc->chip->ack(irq);
+ desc->chip->ack(irq);
action_ret = handle_IRQ_event(irq, desc->action);
if (!noirqdebug)
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 6492400..4408672 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -337,11 +337,9 @@ unsigned int __do_IRQ(unsigned int irq)
/*
* No locking required for CPU-local interrupts:
*/
- if (desc->chip->ack) {
- desc->chip->ack(irq);
- /* get new one */
- desc = irq_remap_to_desc(irq, desc);
- }
+ desc->chip->ack(irq);
+ /* get new one */
+ desc = irq_remap_to_desc(irq, desc);
if (likely(!(desc->status & IRQ_DISABLED))) {
action_ret = handle_IRQ_event(irq, desc->action);
if (!noirqdebug)
@@ -352,10 +350,8 @@ unsigned int __do_IRQ(unsigned int irq)
}
spin_lock(&desc->lock);
- if (desc->chip->ack) {
- desc->chip->ack(irq);
- desc = irq_remap_to_desc(irq, desc);
- }
+ desc->chip->ack(irq);
+ desc = irq_remap_to_desc(irq, desc);
/*
* REPLAY is when Linux resends an IRQ that was dropped earlier
* WAITING is used by probe to mark irqs that are being tested
--
1.5.3.4
next reply other threads:[~2008-12-26 9:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-26 9:13 Wang Chen [this message]
2008-12-26 13:27 ` [PATCH 1/2 -tip] irq: remove unneeded desc->chip->ack check Ingo Molnar
2008-12-29 5:35 ` [PATCH -tip] irq: check chip->ack before calling (WAS: irq: remove unneeded desc->chip->ack check) Wang Chen
2008-12-29 11:23 ` Ingo Molnar
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=4954A02B.4060606@cn.fujitsu.com \
--to=wangchen@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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