From: tushar.behera@linaro.org (Tushar Behera)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division
Date: Wed, 30 Apr 2014 09:20:47 +0530 [thread overview]
Message-ID: <53607317.4040206@linaro.org> (raw)
In-Reply-To: <1398770316-19715-5-git-send-email-kaixu.xia@linaro.org>
On 04/29/2014 04:48 PM, Xia Kaixu wrote:
> From: Arnd Bergmann <arnd@arndb.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@arndb.de>
> Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Sangbeom Kim <sbkim73@samsung.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-samsung-soc at vger.kernel.org
> Cc: alsa-devel at alsa-project.org
> ---
Tested with ARM_LPAE enabled. Without this patch, getting following error.
sound/built-in.o: In function `iis_irq':
sound/soc/samsung/idma.c:277: undefined reference to `__aeabi_uldivmod'
Tested-by: Tushar Behera <tushar.behera@linaro.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);
>
--
Tushar Behera
next prev parent reply other threads:[~2014-04-30 3:50 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1398770316-19715-1-git-send-email-kaixu.xia@linaro.org>
2014-04-29 11:18 ` [PATCH 01/15] ASoC: CS42L51 and WM8962 codecs depend on INPUT Xia Kaixu
2014-04-30 2:31 ` [alsa-devel] " Brian Austin
2014-05-01 1:31 ` Mark Brown
2014-05-01 1:54 ` Austin, Brian
2014-05-01 2:16 ` Austin, Brian
2014-05-01 3:27 ` Mark Brown
2014-05-01 12:26 ` Austin, Brian
2014-05-01 1:30 ` Mark Brown
2014-04-29 11:18 ` [PATCH 03/15] ASoC: SMDK_WM8580_PCM needs REGMAP_I2C Xia Kaixu
2014-05-01 3:30 ` Mark Brown
2014-04-29 11:18 ` [PATCH 04/15] ASoC: samsung-idma: avoid 64-bit division Xia Kaixu
2014-04-30 3:50 ` Tushar Behera [this message]
2014-05-01 3:31 ` Mark Brown
2014-04-29 11:18 ` [PATCH 05/15] ASoC: nuc900: export nuc900_ac97_data Xia Kaixu
2014-05-01 3:32 ` Mark Brown
2014-04-29 11:18 ` [PATCH 07/15] ASoC: UDA1380 needs I2C Xia Kaixu
2014-05-01 17:59 ` Mark Brown
2014-04-29 11:18 ` [PATCH 08/15] ASoC: TTC DKB audio " Xia Kaixu
2014-05-01 18:01 ` Mark Brown
2014-04-29 11:18 ` [PATCH 09/15] ASoC: Migo-R sound " Xia Kaixu
2014-05-01 20:30 ` Mark Brown
2014-04-29 11:18 ` [PATCH 10/15] ASoC: TLV320AIC23 and Simtec Hermes audio Xia Kaixu
2014-05-01 20:29 ` Mark Brown
2014-04-29 11:18 ` [PATCH 11/15] ASoC: WM0010 needs SPI Xia Kaixu
2014-05-01 19:08 ` Mark Brown
2014-04-29 11:18 ` [PATCH 13/15] ASoC: SND_S3C_DMA_LEGACY needs S3C24XX_DMA Xia Kaixu
2014-05-01 19:11 ` Mark Brown
2014-05-01 22:35 ` Arnd Bergmann
2014-05-02 10:25 ` Heiko Stübner
2014-05-02 16:10 ` Arnd Bergmann
2014-05-02 17:26 ` Mark Brown
2014-05-02 17:24 ` Mark Brown
2014-04-29 11:18 ` [PATCH 15/15] ASoC: pxa: remove mach header dependency Xia Kaixu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53607317.4040206@linaro.org \
--to=tushar.behera@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).