lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 23 Dec 2013 09:20:38 -0800 From: Joe Perches <joe@...ches.com> To: Taras Kondratiuk <taras.kondratiuk@...aro.org> Cc: Samuel Ortiz <sameo@...ux.intel.com>, Lee Jones <lee.jones@...aro.org>, patches@...aro.org, linaro-networking@...aro.org, linaro-kernel@...ts.linaro.org, Danke Xie <d.xie@....samsung.com>, linux-kernel@...r.kernel.org Subject: Re: [RESEND PATCH v2] mfd: twl6030: Fix endianness problem in IRQ handler On Mon, 2013-12-23 at 19:11 +0200, Taras Kondratiuk wrote: > From: Danke Xie <d.xie@....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... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists