From: Joe Perches <joe@perches.com>
To: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
Lee Jones <lee.jones@linaro.org>,
patches@linaro.org, linaro-networking@linaro.org,
linaro-kernel@lists.linaro.org, Danke Xie <d.xie@sta.samsung.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH v2] mfd: twl6030: Fix endianness problem in IRQ handler
Date: Mon, 23 Dec 2013 09:20:38 -0800 [thread overview]
Message-ID: <1387819238.22671.71.camel@joe-AO722> (raw)
In-Reply-To: <1387818706-6129-1-git-send-email-taras.kondratiuk@linaro.org>
On Mon, 2013-12-23 at 19:11 +0200, Taras Kondratiuk wrote:
> From: Danke Xie <d.xie@sta.samsung.com>
>
> The current TWL 6030 IRQ handler assumes little endianness.
> This change makes it endian-neutral.
[]
> diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
[]
> @@ -196,8 +197,9 @@ static irqreturn_t twl6030_irq_thread(int irq, void *data)
> if (sts.bytes[2] & 0x10)
> sts.bytes[2] |= 0x08;
>
> - for (i = 0; sts.int_sts; sts.int_sts >>= 1, i++)
> - if (sts.int_sts & 0x1) {
> + int_sts = le32_to_cpu(sts.int_sts);
> + for (i = 0; int_sts; int_sts >>= 1, i++)
> + if (int_sts & 0x1) {
> int module_irq =
> irq_find_mapping(pdata->irq_domain,
> pdata->irq_mapping_tbl[i]);
instead of the
for (...) {
if (foo & 1) {
maybe using ffs would be better/faster
while ((bit = ffs(int_sts))) {
etc...
next prev parent reply other threads:[~2013-12-23 17:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 17:11 [RESEND PATCH v2] mfd: twl6030: Fix endianness problem in IRQ handler Taras Kondratiuk
2013-12-23 17:20 ` Joe Perches [this message]
2013-12-23 17:47 ` Taras Kondratiuk
2014-01-06 10:43 ` Lee Jones
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=1387819238.22671.71.camel@joe-AO722 \
--to=joe@perches.com \
--cc=d.xie@sta.samsung.com \
--cc=lee.jones@linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linaro-networking@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@linaro.org \
--cc=sameo@linux.intel.com \
--cc=taras.kondratiuk@linaro.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