From: Boojin Kim <boojin.kim@samsung.com>
Date: Thu, 3 Nov 2011 06:48:49 +0000 (+0900)
Subject: DMA: PL330: Fix build warning
X-Git-Tag: firefly_0821_release~3680^2~3671^2~40
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dab6538e29e68af6206ec1889c847b428f290989;p=firefly-linux-kernel-4.4.55.git

DMA: PL330: Fix build warning

This patch adds to fix the build warning as following.

drivers/dma/pl330.c: In function 'pl330_probe':
drivers/dma/pl330.c:859: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
---

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 571041477ab2..186b8221803e 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -856,7 +856,8 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
 	INIT_LIST_HEAD(&pd->channels);
 
 	/* Initialize channel parameters */
-	num_chan = max(pdat ? pdat->nr_valid_peri : 0, (u8)pi->pcfg.num_chan);
+	num_chan = max(pdat ? (int)pdat->nr_valid_peri : 0,
+					(int)pi->pcfg.num_chan);
 	pdmac->peripherals = kzalloc(num_chan * sizeof(*pch), GFP_KERNEL);
 
 	for (i = 0; i < num_chan; i++) {