remoteproc: stm32: Fix incorrect type in assignment for va
[ Upstream commit 32381bbccba4c21145c571701f8f7fb1d9b3a92e ] The sparse tool complains about the attribute conversion between a _iomem void * and a void *: stm32_rproc.c:122:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *va @@ got void [noderef] __iomem * @@ stm32_rproc.c:122:12: sparse: expected void *va stm32_rproc.c:122:12: sparse: got void [noderef] __iomem * Add '__force' to explicitly specify that the cast is intentional. This conversion is necessary to cast to virtual addresses pointer,used, by the remoteproc core. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202312150052.HCiNKlqB-lkp@intel.com/ Fixes: 13140de09cc2 ("remoteproc: stm32: add an ST stm32_rproc driver") Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Link: https://lore.kernel.org/r/20240117135312.3381936-2-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
801c72475c
commit
1b365b9edc
1 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,7 @@ static int stm32_rproc_mem_alloc(struct rproc *rproc,
|
||||||
void *va;
|
void *va;
|
||||||
|
|
||||||
dev_dbg(dev, "map memory: %pad+%zx\n", &mem->dma, mem->len);
|
dev_dbg(dev, "map memory: %pad+%zx\n", &mem->dma, mem->len);
|
||||||
va = ioremap_wc(mem->dma, mem->len);
|
va = (__force void *)ioremap_wc(mem->dma, mem->len);
|
||||||
if (IS_ERR_OR_NULL(va)) {
|
if (IS_ERR_OR_NULL(va)) {
|
||||||
dev_err(dev, "Unable to map memory region: %pad+0x%zx\n",
|
dev_err(dev, "Unable to map memory region: %pad+0x%zx\n",
|
||||||
&mem->dma, mem->len);
|
&mem->dma, mem->len);
|
||||||
|
@ -135,7 +135,7 @@ static int stm32_rproc_mem_release(struct rproc *rproc,
|
||||||
struct rproc_mem_entry *mem)
|
struct rproc_mem_entry *mem)
|
||||||
{
|
{
|
||||||
dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma);
|
dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma);
|
||||||
iounmap(mem->va);
|
iounmap((__force __iomem void *)mem->va);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue