From patchwork Tue Apr 29 09:23:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xia Kaixu X-Patchwork-Id: 29321 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3D0C5202DD for ; Tue, 29 Apr 2014 09:24:21 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id 29sf32347716yhl.5 for ; Tue, 29 Apr 2014 02:24:21 -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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=D4ymdLJ8N0focOIF3EmOZtIsSqZ9BCHlYg2UJatFi5Q=; b=mvQ34nHQ7w4hXDES1xRtEOlfmsgyjI7D5q1iuvIhDfBNj48Xd79Vgkf8XJti0RmySU BL1aJWWulUwY54ZlT9FYk6WvnJcBdqZ+6MMeNSm5nQk3FAoDLy/yurHTf+3Pxqcubj5F QApN2NLSSdajILTMJjK/2aL7OFhclQIo4MDH534r+7l01fMcq+5B4bGbyTPFtDqApVrm eaq2xgcDjd/M6QJonOcXRXDwItR9Ar2kt4fueXi0cvf9Uf90I/m0xDE/8erQbhrtM+yM HZNjyoQRuVGTPvxAvhj04KXSqpTKEQdBt2jTiLXLmtOkbt/afMATCw4L7hko0SybnPDW OzKg== X-Gm-Message-State: ALoCoQmbUBOBcLb4/cu2XaVuNwDwbjVqt5fA6qmil87aVozWA/wQjzqnIkDTQHc08Tep7YtVNeSF X-Received: by 10.58.46.240 with SMTP id y16mr15205614vem.2.1398763460969; Tue, 29 Apr 2014 02:24:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.201 with SMTP id f67ls14265qgd.91.gmail; Tue, 29 Apr 2014 02:24:20 -0700 (PDT) X-Received: by 10.58.111.163 with SMTP id ij3mr1130515veb.26.1398763460838; Tue, 29 Apr 2014 02:24:20 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id 2si4367476vcd.95.2014.04.29.02.24.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 02:24:20 -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.179; Received: by mail-ve0-f179.google.com with SMTP id db12so9728770veb.10 for ; Tue, 29 Apr 2014 02:24:20 -0700 (PDT) X-Received: by 10.52.6.162 with SMTP id c2mr24483384vda.6.1398763460737; Tue, 29 Apr 2014 02:24:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp181814vcb; Tue, 29 Apr 2014 02:24:20 -0700 (PDT) X-Received: by 10.69.20.65 with SMTP id ha1mr14990512pbd.75.1398763460051; Tue, 29 Apr 2014 02:24:20 -0700 (PDT) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id db3si12234043pbc.445.2014.04.29.02.24.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 02:24:20 -0700 (PDT) Received-SPF: none (google.com: kaixu.xia@linaro.org does not designate permitted sender hosts) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id rq2so1956963pbb.24 for ; Tue, 29 Apr 2014 02:24:19 -0700 (PDT) X-Received: by 10.68.201.10 with SMTP id jw10mr34788240pbc.25.1398763459706; Tue, 29 Apr 2014 02:24:19 -0700 (PDT) Received: from localhost.localdomain ([218.17.215.175]) by mx.google.com with ESMTPSA id ek2sm40447807pbd.30.2014.04.29.02.24.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 02:24:19 -0700 (PDT) From: Xia Kaixu To: linaro-kernel@lists.linaro.org, arnd@arndb.de Cc: kaixu.xia@linaro.org, patches@linaro.org Subject: [PATCH v2 04/15] ASoC: samsung-idma: avoid 64-bit division Date: Tue, 29 Apr 2014 17:23:21 +0800 Message-Id: <1398763412-18928-5-git-send-email-kaixu.xia@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398763412-18928-1-git-send-email-kaixu.xia@linaro.org> References: <1398763412-18928-1-git-send-email-kaixu.xia@linaro.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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: 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 --- 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);