]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00271577 sdma: fix the compiling warning
authorHuang Shijie <b32955@freescale.com>
Thu, 18 Jul 2013 02:48:47 +0000 (10:48 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:14:14 +0000 (14:14 +0200)
In the imx6sl, we meet the compiling warning shows below:
--------------------------------------------------------------------
drivers/dma/imx-sdma.c: In function Pleasesdma_iram_free:
drivers/dma/imx-sdma.c:366: warning: passing argument 2 of
Pleasegen_pool_free makes integer from pointer without a cast
include/linux/genalloc.h:58: note: expected Pleaselong unsigned integer
but argument is of type Pleaselong unsigned int *Please
drivers/dma/imx-sdma.c: In function Pleasesdma_load_script:
drivers/dma/imx-sdma.c:452: warning: passing argument 2 of
Pleasesdma_iram_malloc makes pointer from integer without a cast
drivers/dma/imx-sdma.c:352: note: expected Pleaselong unsigned
int *Please but argument is of type Pleaselong unsigned integer
drivers/dma/imx-sdma.c:475: warning: passing argument 1 of
Pleasesdma_iram_free makes pointer from integer without a cast
drivers/dma/imx-sdma.c:361: note: expected Pleaselong unsigned
int *Please but argument is of type Pleasedma_addr_t
drivers/dma/imx-sdma.c: In function Pleasesdma_request_channel:
drivers/dma/imx-sdma.c:942: warning: passing argument 2 of
Pleasesdma_iram_malloc makes pointer from integer without a cast
drivers/dma/imx-sdma.c:352: note: expected Pleaselong unsigned int
*Please but argument is of type Pleaselong unsigned integer
drivers/dma/imx-sdma.c: In function Pleasesdma_free_chan_resources:
drivers/dma/imx-sdma.c:1109: warning: passing argument 1 of
Pleasesdma_iram_free makes pointer from integer without a cast
drivers/dma/imx-sdma.c:361: note: expected Pleaselong unsigned int
*Please but argument is of type Pleasedma_addr_t
drivers/dma/imx-sdma.c: In function Pleasesdma_init:
drivers/dma/imx-sdma.c:1505: warning: passing argument 2 of
Pleasesdma_iram_malloc from incompatible pointer type
drivers/dma/imx-sdma.c:352: note: expected Pleaselong unsigned int
*Please but argument is of type Pleasedma_addr_t *Please
--------------------------------------------------------------------

this patch fixes it.

Signed-off-by: Huang Shijie <b32955@freescale.com>
drivers/dma/imx-sdma.c

index 9048f469337f1c5af1861cc899ec1ee8079b3657..bee75e8c85c590b7a71df517dee8fd673d84f4c4 100644 (file)
@@ -358,7 +358,7 @@ void __iomem *sdma_iram_malloc(size_t size, unsigned long *buf)
        return sdma_iram_phys_to_virt(*buf);
 }
 
-void sdma_iram_free(unsigned long *buf, u32 size)
+void sdma_iram_free(unsigned long buf, size_t size)
 {
        if (!sdma_iram_pool)
                return;
@@ -449,7 +449,7 @@ static int sdma_load_script(struct sdma_engine *sdma, void *buf, int size,
        int ret;
 
 #ifdef CONFIG_SDMA_IRAM
-       buf_virt = sdma_iram_malloc(size, (unsigned long)&buf_phys);
+       buf_virt = sdma_iram_malloc(size, (unsigned long *)&buf_phys);
 #else
        buf_virt = dma_alloc_coherent(NULL,
                        size,
@@ -939,7 +939,7 @@ static int sdma_request_channel(struct sdma_channel *sdmac)
 
 #ifdef CONFIG_SDMA_IRAM
        sdmac->bd = sdma_iram_malloc(sizeof(sdmac->bd),
-                                       (unsigned long)&sdmac->bd_phys);
+                                       (unsigned long *)&sdmac->bd_phys);
 #else
        sdmac->bd = dma_alloc_noncached(NULL, PAGE_SIZE, &sdmac->bd_phys, GFP_KERNEL);
 #endif
@@ -1502,7 +1502,7 @@ static int __init sdma_init(struct sdma_engine *sdma)
        sdma->channel_control = sdma_iram_malloc(MAX_DMA_CHANNELS *
                        sizeof(struct sdma_channel_control)
                        + sizeof(struct sdma_context_data),
-                       &ccb_phys);
+                       (unsigned long *)&ccb_phys);
 #else
        sdma->channel_control = dma_alloc_coherent(NULL,
                        MAX_DMA_CHANNELS * sizeof (struct sdma_channel_control) +