Commit 903635cb authored by Tzung-Bi Shih's avatar Tzung-Bi Shih Committed by Bjorn Andersson

remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free

Fixes the following sparse errors on dma_alloc_coherent() and
dma_free_coherent().

On drivers/remoteproc/mtk_scp.c:559:23:
warning: incorrect type in assignment (different address spaces)
   expected void [noderef] __iomem *cpu_addr
   got void *

On drivers/remoteproc/mtk_scp.c:572:56:
warning: incorrect type in argument 3 (different address spaces)
   expected void *cpu_addr
   got void [noderef] __iomem *cpu_addr

The cpu_addr is not a __iomem address.  Removes the marker.
Reviewed-by: default avatarNicolas Boichat <drinkcat@chromium.org>
Reviewed-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20201116082537.3287009-3-tzungbi@google.comSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 778f2664
...@@ -99,7 +99,7 @@ struct mtk_scp { ...@@ -99,7 +99,7 @@ struct mtk_scp {
bool ipi_id_ack[SCP_IPI_MAX]; bool ipi_id_ack[SCP_IPI_MAX];
wait_queue_head_t ack_wq; wait_queue_head_t ack_wq;
void __iomem *cpu_addr; void *cpu_addr;
dma_addr_t dma_addr; dma_addr_t dma_addr;
size_t dram_size; size_t dram_size;
......
...@@ -413,7 +413,7 @@ static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len) ...@@ -413,7 +413,7 @@ static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len)
} else if (scp->dram_size) { } else if (scp->dram_size) {
offset = da - scp->dma_addr; offset = da - scp->dma_addr;
if (offset >= 0 && (offset + len) < scp->dram_size) if (offset >= 0 && (offset + len) < scp->dram_size)
return (void __force *)scp->cpu_addr + offset; return scp->cpu_addr + offset;
} }
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment