* [PATCH] remoteproc: imx_dsp_rproc: fix argument 2 of rproc_mem_entry_init
@ 2022-08-15 12:43 Shengjiu Wang
2022-08-15 14:53 ` Mukesh Ojha
2022-08-23 20:06 ` Mathieu Poirier
0 siblings, 2 replies; 3+ messages in thread
From: Shengjiu Wang @ 2022-08-15 12:43 UTC (permalink / raw)
To: bjorn.andersson, mathieu.poirier, shawnguo, s.hauer, kernel,
festevam, linux-imx, linux-remoteproc, linux-arm-kernel,
linux-kernel
There are sparse warning:
drivers/remoteproc/imx_dsp_rproc.c:602:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *va @@ got void [noderef] __iomem *[assigned] cpu_addr @@
drivers/remoteproc/imx_dsp_rproc.c:602:49: sparse: expected void *va
drivers/remoteproc/imx_dsp_rproc.c:602:49: sparse: got void [noderef] __iomem *[assigned] cpu_addr
drivers/remoteproc/imx_dsp_rproc.c:638:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *va @@ got void [noderef] __iomem *[assigned] cpu_addr @@
drivers/remoteproc/imx_dsp_rproc.c:638:49: sparse: expected void *va
drivers/remoteproc/imx_dsp_rproc.c:638:49: sparse: got void [noderef] __iomem *[assigned] cpu_addr
Fixes: ec0e5549f358 ("remoteproc: imx_dsp_rproc: Add remoteproc driver for DSP on i.MX")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
drivers/remoteproc/imx_dsp_rproc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
index ca0817f8e41e..899aa8dd12f0 100644
--- a/drivers/remoteproc/imx_dsp_rproc.c
+++ b/drivers/remoteproc/imx_dsp_rproc.c
@@ -599,7 +599,7 @@ static int imx_dsp_rproc_add_carveout(struct imx_dsp_rproc *priv)
}
/* Register memory region */
- mem = rproc_mem_entry_init(dev, cpu_addr, (dma_addr_t)att->sa,
+ mem = rproc_mem_entry_init(dev, (void __force *)cpu_addr, (dma_addr_t)att->sa,
att->size, da, NULL, NULL, "dsp_mem");
if (mem)
@@ -635,7 +635,7 @@ static int imx_dsp_rproc_add_carveout(struct imx_dsp_rproc *priv)
}
/* Register memory region */
- mem = rproc_mem_entry_init(dev, cpu_addr, (dma_addr_t)rmem->base,
+ mem = rproc_mem_entry_init(dev, (void __force *)cpu_addr, (dma_addr_t)rmem->base,
rmem->size, da, NULL, NULL, it.node->name);
if (mem)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] remoteproc: imx_dsp_rproc: fix argument 2 of rproc_mem_entry_init
2022-08-15 12:43 [PATCH] remoteproc: imx_dsp_rproc: fix argument 2 of rproc_mem_entry_init Shengjiu Wang
@ 2022-08-15 14:53 ` Mukesh Ojha
2022-08-23 20:06 ` Mathieu Poirier
1 sibling, 0 replies; 3+ messages in thread
From: Mukesh Ojha @ 2022-08-15 14:53 UTC (permalink / raw)
To: Shengjiu Wang, bjorn.andersson, mathieu.poirier, shawnguo,
s.hauer, kernel, festevam, linux-imx, linux-remoteproc,
linux-arm-kernel, linux-kernel
Hi,
On 8/15/2022 6:13 PM, Shengjiu Wang wrote:
> There are sparse warning:
> drivers/remoteproc/imx_dsp_rproc.c:602:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *va @@ got void [noderef] __iomem *[assigned] cpu_addr @@
> drivers/remoteproc/imx_dsp_rproc.c:602:49: sparse: expected void *va
> drivers/remoteproc/imx_dsp_rproc.c:602:49: sparse: got void [noderef] __iomem *[assigned] cpu_addr
> drivers/remoteproc/imx_dsp_rproc.c:638:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *va @@ got void [noderef] __iomem *[assigned] cpu_addr @@
> drivers/remoteproc/imx_dsp_rproc.c:638:49: sparse: expected void *va
> drivers/remoteproc/imx_dsp_rproc.c:638:49: sparse: got void [noderef] __iomem *[assigned] cpu_addr
>
> Fixes: ec0e5549f358 ("remoteproc: imx_dsp_rproc: Add remoteproc driver for DSP on i.MX")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
> drivers/remoteproc/imx_dsp_rproc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
> index ca0817f8e41e..899aa8dd12f0 100644
> --- a/drivers/remoteproc/imx_dsp_rproc.c
> +++ b/drivers/remoteproc/imx_dsp_rproc.c
> @@ -599,7 +599,7 @@ static int imx_dsp_rproc_add_carveout(struct imx_dsp_rproc *priv)
> }
>
> /* Register memory region */
> - mem = rproc_mem_entry_init(dev, cpu_addr, (dma_addr_t)att->sa,
> + mem = rproc_mem_entry_init(dev, (void __force *)cpu_addr, (dma_addr_t)att->sa,
> att->size, da, NULL, NULL, "dsp_mem");
>
> if (mem)
> @@ -635,7 +635,7 @@ static int imx_dsp_rproc_add_carveout(struct imx_dsp_rproc *priv)
> }
>
> /* Register memory region */
> - mem = rproc_mem_entry_init(dev, cpu_addr, (dma_addr_t)rmem->base,
> + mem = rproc_mem_entry_init(dev, (void __force *)cpu_addr, (dma_addr_t)rmem->base,
> rmem->size, da, NULL, NULL, it.node->name);
>
> if (mem)
Acked-by: Mukesh Ojha <quic_mojha@quicinc.com>
-Mukesh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] remoteproc: imx_dsp_rproc: fix argument 2 of rproc_mem_entry_init
2022-08-15 12:43 [PATCH] remoteproc: imx_dsp_rproc: fix argument 2 of rproc_mem_entry_init Shengjiu Wang
2022-08-15 14:53 ` Mukesh Ojha
@ 2022-08-23 20:06 ` Mathieu Poirier
1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Poirier @ 2022-08-23 20:06 UTC (permalink / raw)
To: Shengjiu Wang
Cc: bjorn.andersson, shawnguo, s.hauer, kernel, festevam, linux-imx,
linux-remoteproc, linux-arm-kernel, linux-kernel
On Mon, Aug 15, 2022 at 08:43:18PM +0800, Shengjiu Wang wrote:
> There are sparse warning:
> drivers/remoteproc/imx_dsp_rproc.c:602:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *va @@ got void [noderef] __iomem *[assigned] cpu_addr @@
> drivers/remoteproc/imx_dsp_rproc.c:602:49: sparse: expected void *va
> drivers/remoteproc/imx_dsp_rproc.c:602:49: sparse: got void [noderef] __iomem *[assigned] cpu_addr
> drivers/remoteproc/imx_dsp_rproc.c:638:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *va @@ got void [noderef] __iomem *[assigned] cpu_addr @@
> drivers/remoteproc/imx_dsp_rproc.c:638:49: sparse: expected void *va
> drivers/remoteproc/imx_dsp_rproc.c:638:49: sparse: got void [noderef] __iomem *[assigned] cpu_addr
>
> Fixes: ec0e5549f358 ("remoteproc: imx_dsp_rproc: Add remoteproc driver for DSP on i.MX")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
> drivers/remoteproc/imx_dsp_rproc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
> index ca0817f8e41e..899aa8dd12f0 100644
> --- a/drivers/remoteproc/imx_dsp_rproc.c
> +++ b/drivers/remoteproc/imx_dsp_rproc.c
> @@ -599,7 +599,7 @@ static int imx_dsp_rproc_add_carveout(struct imx_dsp_rproc *priv)
> }
>
> /* Register memory region */
> - mem = rproc_mem_entry_init(dev, cpu_addr, (dma_addr_t)att->sa,
> + mem = rproc_mem_entry_init(dev, (void __force *)cpu_addr, (dma_addr_t)att->sa,
> att->size, da, NULL, NULL, "dsp_mem");
>
> if (mem)
> @@ -635,7 +635,7 @@ static int imx_dsp_rproc_add_carveout(struct imx_dsp_rproc *priv)
> }
>
> /* Register memory region */
> - mem = rproc_mem_entry_init(dev, cpu_addr, (dma_addr_t)rmem->base,
> + mem = rproc_mem_entry_init(dev, (void __force *)cpu_addr, (dma_addr_t)rmem->base,
> rmem->size, da, NULL, NULL, it.node->name);
Applied.
Thanks,
Mathieu
>
> if (mem)
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-23 20:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-15 12:43 [PATCH] remoteproc: imx_dsp_rproc: fix argument 2 of rproc_mem_entry_init Shengjiu Wang
2022-08-15 14:53 ` Mukesh Ojha
2022-08-23 20:06 ` Mathieu Poirier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).