From patchwork Tue Apr 29 11:18:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xia Kaixu X-Patchwork-Id: 4087801 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 34D9C9F169 for ; Tue, 29 Apr 2014 14:32:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70D1A2021B for ; Tue, 29 Apr 2014 14:32:05 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1503520148 for ; Tue, 29 Apr 2014 14:32:04 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1EE36265357; Tue, 29 Apr 2014 16:32:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, RCVD_IN_SORBS_WEB, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 99148265086; Tue, 29 Apr 2014 16:28:00 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A95E3264F3F; Tue, 29 Apr 2014 13:19:29 +0200 (CEST) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by alsa0.perex.cz (Postfix) with ESMTP id AD99E264F3F for ; Tue, 29 Apr 2014 13:19:23 +0200 (CEST) Received: by mail-pd0-f182.google.com with SMTP id v10so46732pde.27 for ; Tue, 29 Apr 2014 04:19:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=D4ymdLJ8N0focOIF3EmOZtIsSqZ9BCHlYg2UJatFi5Q=; b=QMo3MNz/X6rVQENO+6k4nMoxcIYaJnLxx3qDAuM7VmLo0p6LOdBGWQlE6tNBHwMSFX dpAEHOmo915vHuccoECAijOKod7cpOtaJR1VTHbMSYifQ6uqRYh4aBO5S7WMgbuhmDjO skaoSI+UOQS3WAo66ubQNPyoiPl/CTLGKHQQXKpNbEhdOlqAm9IOC9O0P9GHr6YdnHKQ MPt3P2ZjbhpEg94EGVLEyjiASfBTq9uY+yPCLB0RMa1U8IN5Y+ZBZT9o2fRoIfsaegsl 7SEh/xgtMbqsMCMRBxE2pxRvcFE2Z6t/csXj7G+K3H/sJXAIDUmtX7zxn6XbutBL/GZb Ti0A== X-Gm-Message-State: ALoCoQkIpcS7zUgDFr839KaDUGdMEMkpQ5AY5REea443Tkt2c8/EvNkGpK77AhMce056qNw+2oce X-Received: by 10.67.14.69 with SMTP id fe5mr32353319pad.120.1398770362552; Tue, 29 Apr 2014 04:19:22 -0700 (PDT) Received: from localhost.localdomain ([218.17.215.175]) by mx.google.com with ESMTPSA id xo9sm108641006pab.18.2014.04.29.04.19.17 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 04:19:22 -0700 (PDT) From: Xia Kaixu To: linux-kernel@vger.kernel.org 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> X-Mailman-Approved-At: Tue, 29 Apr 2014 16:27:55 +0200 Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org, arnd@arndb.de, Sangbeom Kim , Liam Girdwood , linux-samsung-soc@vger.kernel.org, Mark Brown , Ben Dooks , Kukjin Kim , linux-arm-kernel@lists.infradead.org, kaixu.xia@linaro.org Subject: [alsa-devel] [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-by: Tushar Behera --- 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);