Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757462AbaD2LTZ (ORCPT ); Tue, 29 Apr 2014 07:19:25 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:60347 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757429AbaD2LTX (ORCPT ); Tue, 29 Apr 2014 07:19:23 -0400 From: Xia Kaixu To: linux-kernel@vger.kernel.org Cc: linaro-kernel@lists.linaro.org, arnd@arndb.de, kaixu.xia@linaro.org, Mark Brown , Liam Girdwood , Ben Dooks , Kukjin Kim , Sangbeom Kim , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division Date: Tue, 29 Apr 2014 19:18:25 +0800 Message-Id: <1398770316-19715-5-git-send-email-kaixu.xia@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org> References: <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann 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 Signed-off-by: Xia Kaixu Cc: Mark Brown Cc: Liam Girdwood Cc: Ben Dooks Cc: Kukjin Kim Cc: Sangbeom Kim Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: alsa-devel@alsa-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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/