From 68e74fa4902acd99680ec57f7b1aa0cf62dc0a3a Mon Sep 17 00:00:00 2001 From: Eunok Jo Date: Tue, 7 Feb 2017 19:51:42 +0900 Subject: [PATCH] dma: svace fix: fix variable type mismatch WGID: 95862, 96284, 96746, 96796, 97246 Change-Id: I7bfbd10408e7982fe01884435dcb396052c6e42f Signed-off-by: Eunok Jo --- drivers/dma/pl330.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 888f35012ff1..8b4e0a98b110 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -1212,7 +1212,7 @@ static inline int _loop_infiniteloop(struct pl330_dmac *pl330, unsigned dry_run, lcnt1 = 256; cyc = bursts / 256; } else { - lcnt1 = bursts; + lcnt1 = (unsigned int)bursts; cyc = 1; } @@ -1238,7 +1238,7 @@ static inline int _loop_infiniteloop(struct pl330_dmac *pl330, unsigned dry_run, off += _emit_LPEND(dry_run, &buf[off], &lpend); /* remainder */ - lcnt1 = bursts - (lcnt1 * cyc); + lcnt1 = (unsigned int)(bursts - (lcnt1 * cyc)); if (lcnt1) { off += _emit_LP(dry_run, &buf[off], 1, lcnt1); @@ -1286,10 +1286,10 @@ static inline int _loop(struct pl330_dmac *pl330, unsigned dry_run, u8 buf[], cyc = *bursts / lcnt1 / lcnt0; } else if (*bursts > 256) { lcnt1 = 256; - lcnt0 = *bursts / lcnt1; + lcnt0 = (unsigned int)((unsigned int)(*bursts) / lcnt1); cyc = 1; } else { - lcnt1 = *bursts; + lcnt1 = (unsigned int)(*bursts); lcnt0 = 0; cyc = 1; } @@ -2655,7 +2655,7 @@ static struct dma_pl330_desc *pl330_get_desc(struct dma_pl330_chan *pch) static inline void fill_px(struct pl330_xfer *px, dma_addr_t dst, dma_addr_t src, size_t len) { - px->bytes = len; + px->bytes = (u32)len; px->dst_addr = dst; px->src_addr = src; } -- 2.20.1