Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] DMA: PL330: Fix build warning
@ 2011-11-03  6:48 Boojin Kim
  2011-11-10  9:44 ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: Boojin Kim @ 2011-11-03  6:48 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/dma/pl330.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 621134f..379d928 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++) {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] DMA: PL330: Fix build warning
  2011-11-03  6:48 [PATCH] DMA: PL330: Fix build warning Boojin Kim
@ 2011-11-10  9:44 ` Vinod Koul
  2011-11-10 10:00   ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2011-11-10  9:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2011-11-03 at 15:48 +0900, Boojin Kim wrote:
> 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>
> ---
>  drivers/dma/pl330.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index 621134f..379d928 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++) {

Applied Thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] DMA: PL330: Fix build warning
  2011-11-10  9:44 ` Vinod Koul
@ 2011-11-10 10:00   ` Joe Perches
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2011-11-10 10:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2011-11-10 at 15:14 +0530, Vinod Koul wrote:
> On Thu, 2011-11-03 at 15:48 +0900, Boojin Kim wrote:
> > 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>
> > ---
> >  drivers/dma/pl330.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> > index 621134f..379d928 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++) {
> 
> Applied Thanks

Perhaps
	max_t(int, pdat ? pdat->nr_valid_peri : 0, pi->pcfg.num_chan);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-10 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-03  6:48 [PATCH] DMA: PL330: Fix build warning Boojin Kim
2011-11-10  9:44 ` Vinod Koul
2011-11-10 10:00   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox