From: Andrew Morton <akpm@linux-foundation.org>
To: Marc Zyngier <maz@misterjones.org>
Cc: Eric Miao <eric.y.miao@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Jebediah Huang <jebediah.huang@gmail.com>
Subject: Re: [PATCH] gpio: add interrupt handling capability to max732x
Date: Fri, 19 Mar 2010 16:41:56 -0700 [thread overview]
Message-ID: <20100319164156.87b6fc43.akpm@linux-foundation.org> (raw)
In-Reply-To: <4ed0c90d27185c38ccb15d6d4442cfd4@localhost>
On Tue, 16 Mar 2010 11:34:52 +0100
Marc Zyngier <maz@misterjones.org> wrote:
> +static irqreturn_t max732x_irq_handler(int irq, void *devid)
> +{
> + struct max732x_chip *chip = devid;
> + uint8_t pending;
> + uint8_t level;
> +
> + pending = max732x_irq_pending(chip);
> +
> + if (!pending)
> + return IRQ_HANDLED;
Should be IRQ_NONE?
If this device was on a shared interrupt line and the interrupt was
caused by some other device, and this handler is called first then the
incorrect IRQ_HANDLED return could cause the irq core to do wrong things.
> + do {
> + level = __ffs(pending);
> + handle_nested_irq(level + chip->irq_base);
> +
> + pending &= ~(1 << level);
> + } while (pending);
> +
> + return IRQ_HANDLED;
> +}
next prev parent reply other threads:[~2010-03-19 23:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 10:34 [PATCH] gpio: add interrupt handling capability to max732x Marc Zyngier
2010-03-19 23:41 ` Andrew Morton [this message]
2010-03-20 5:44 ` Marc Zyngier
2010-03-22 7:39 ` Marc Zyngier
2010-03-22 4:58 ` Andrew Morton
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=20100319164156.87b6fc43.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=eric.y.miao@gmail.com \
--cc=jebediah.huang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@misterjones.org \
/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