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: 29336 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f198.google.com (mail-yk0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 73FF8202FE for ; Tue, 29 Apr 2014 11:19:52 +0000 (UTC) Received: by mail-yk0-f198.google.com with SMTP id 9sf109096ykp.1 for ; Tue, 29 Apr 2014 04:19:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=gMGdxMFvkgK3UgJ69LKCWKp9v67+HjtCLlrUC+IWxe8=; b=ZKBXn4iwWVMbO2Ge7TD5TTBHz3QZEhxXBqStzK91TehegwgWR9OicTuh1j4noojsn7 yAjDJFxgbn35EBFSvURWlYISsFENXtLyj5aFJtO0bdIO1MIBzGNMlbCL+0LAi9Hp96ta zSasH3E0aFhvm8lNThJduvATCHrIUNO/q9vSDNUukD2EdLFY/rqJw2z9ToZdPpjx4nCa YNOOE8TutpR7S6IBniuNQ/LayiiXynCrX/sOaHD6T4fEvYdcluMG3+SkVYgTKrXD7usd dndM9fCvZt+HTSv/1vQazJa/69TbQ6qNU1zo1J8AFuVceyApxOraHX8iERXNd9ZxCC1V ap3w== X-Gm-Message-State: ALoCoQne2ycIHbLvQhYMxHYvvWXKuHyJk7KPlnUyVHYGW+MlaE9/Kiqkp3n1D+W0Hzgrp93HsDNB X-Received: by 10.52.163.82 with SMTP id yg18mr13511670vdb.3.1398770392176; Tue, 29 Apr 2014 04:19:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.229 with SMTP id n92ls50800qgd.9.gmail; Tue, 29 Apr 2014 04:19:52 -0700 (PDT) X-Received: by 10.221.37.1 with SMTP id tc1mr569641vcb.32.1398770392015; Tue, 29 Apr 2014 04:19:52 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id sj10si4429990vcb.15.2014.04.29.04.19.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 04:19:52 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id sa20so54277veb.29 for ; Tue, 29 Apr 2014 04:19:51 -0700 (PDT) X-Received: by 10.58.23.6 with SMTP id i6mr28660631vef.12.1398770391917; Tue, 29 Apr 2014 04:19:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp188695vcb; Tue, 29 Apr 2014 04:19:51 -0700 (PDT) X-Received: by 10.66.146.105 with SMTP id tb9mr9493849pab.157.1398770391190; Tue, 29 Apr 2014 04:19:51 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id td10si12585278pac.99.2014.04.29.04.19.42 for ; Tue, 29 Apr 2014 04:19:42 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757463AbaD2LTZ (ORCPT + 28 others); 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 Received: by mail-pd0-f170.google.com with SMTP id x10so48228pdj.15 for ; Tue, 29 Apr 2014 04:19:22 -0700 (PDT) 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 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 Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kaixu.xia@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);