[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1398770316-19715-5-git-send-email-kaixu.xia@linaro.org>
Date: Tue, 29 Apr 2014 19:18:25 +0800
From: Xia Kaixu <kaixu.xia@...aro.org>
To: linux-kernel@...r.kernel.org
Cc: linaro-kernel@...ts.linaro.org, arnd@...db.de,
kaixu.xia@...aro.org, Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Ben Dooks <ben-linux@...ff.org>,
Kukjin Kim <kgene.kim@...sung.com>,
Sangbeom Kim <sbkim73@...sung.com>,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, alsa-devel@...a-project.org
Subject: [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
From: Arnd Bergmann <arnd@...db.de>
dma_addr_t may be 64 bit wide, which causes a build failure
when doing a division on it. Here it is safe to cast to an
u32 type, which avoids the problem.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Xia Kaixu <kaixu.xia@...aro.org>
Cc: Mark Brown <broonie@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>
Cc: Ben Dooks <ben-linux@...ff.org>
Cc: Kukjin Kim <kgene.kim@...sung.com>
Cc: Sangbeom Kim <sbkim73@...sung.com>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-samsung-soc@...r.kernel.org
Cc: alsa-devel@...a-project.org
---
sound/soc/samsung/idma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c
index 3d5cf15..e9891b4 100644
--- a/sound/soc/samsung/idma.c
+++ b/sound/soc/samsung/idma.c
@@ -274,7 +274,7 @@ static irqreturn_t iis_irq(int irqno, void *dev_id)
addr = readl(idma.regs + I2SLVL0ADDR) - idma.lp_tx_addr;
addr += prtd->periodsz;
- addr %= (prtd->end - prtd->start);
+ addr %= (u32)(prtd->end - prtd->start);
addr += idma.lp_tx_addr;
writel(addr, idma.regs + I2SLVL0ADDR);
--
1.7.9.5
--
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