DMA: PL330: Fix build warning
Subsystems (2)
PATCH 1/1 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
--- drivers/dma/pl330.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/dma/pl330.c +2 -1
@@ -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++) {
Signature · 1 line
1.7.1
PATCH 1/1 DMA: PL330: Fix build warning
Quoted 15 lines · Boojin Kim
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 castSigned-off-by Boojin Kim <[email protected]>--- drivers/dma/pl330.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/dma/pl330.c +0
-0
drivers/dma/pl330.c pl330_probe(struct amba_device *adev, const struct amba_id *id) · line 863
Quoted 9 lines
drivers/dma/pl330.c +2
-1@@ -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
Signature · 1 line
~Vinod
PATCH 1/1 DMA: PL330: Fix build warning
Quoted 24 lines · Vinod Koul
Quoted 23 lines · Boojin Kim
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 castSigned-off-by Boojin Kim <[email protected]>--- drivers/dma/pl330.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/dma/pl330.c +2
-1@@ -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 );
Quoted 3 lines
drivers/dma/pl330.c pl330_probe(struct amba_device *adev, const struct amba_id *id) · line 863
Quoted 1 line
drivers/dma/pl330.c +0
-0for (i =0 ; i < num_chan; i++) {Applied Thanks
Perhaps
max_t(int, pdat ? pdat->nr_valid_peri : 0, pi->pcfg.num_chan);