linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning
@ 2023-04-07 16:14 Mathieu Poirier
  2023-04-10 23:28 ` Iuliana Prodan
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Poirier @ 2023-04-07 16:14 UTC (permalink / raw)
  To: iuliana.prodan, andersson
  Cc: linux-remoteproc, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-arm-kernel, linux-kernel

This patch fixes the kernel test robot warning reported here:

https://lore.kernel.org/bpf/642f916b.pPIKZ%2Fl%2F%2Fbw8tvIH%25lkp@intel.com/T/

Fixes: 408ec1ff0caa ("remoteproc: imx_dsp_rproc: Add custom memory copy implementation for i.MX DSP Cores")
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---

Iuliana - please thest this on your side

---
 drivers/remoteproc/imx_dsp_rproc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
index 21759d9e5b7b..c805cb83cacc 100644
--- a/drivers/remoteproc/imx_dsp_rproc.c
+++ b/drivers/remoteproc/imx_dsp_rproc.c
@@ -750,12 +750,12 @@ static void imx_dsp_rproc_kick(struct rproc *rproc, int vqid)
  * The IRAM is part of the HiFi DSP.
  * According to hw specs only 32-bits writes are allowed.
  */
-static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size)
+static int imx_dsp_rproc_memcpy(void *dst, const void *src, size_t size)
 {
+	void __iomem *dest = (void __iomem *)dst;
 	const u8 *src_byte = src;
 	const u32 *source = src;
 	u32 affected_mask;
-	u32 *dst = dest;
 	int i, q, r;
 	u32 tmp;
 
@@ -768,7 +768,7 @@ static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size)
 
 	/* copy data in units of 32 bits at a time */
 	for (i = 0; i < q; i++)
-		writel(source[i], &dst[i]);
+		writel(source[i], dest + i * 4);
 
 	if (r) {
 		affected_mask = GENMASK(8 * r, 0);
@@ -799,8 +799,8 @@ static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size)
  */
 static int imx_dsp_rproc_memset(void *addr, u8 value, size_t size)
 {
+	void __iomem *tmp_dst = (void __iomem *)addr;
 	u32 tmp_val = value;
-	u32 *tmp_dst = addr;
 	u32 affected_mask;
 	int q, r;
 	u32 tmp;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning
  2023-04-07 16:14 [PATCH] remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning Mathieu Poirier
@ 2023-04-10 23:28 ` Iuliana Prodan
  2023-04-11 17:22   ` Mathieu Poirier
  0 siblings, 1 reply; 3+ messages in thread
From: Iuliana Prodan @ 2023-04-10 23:28 UTC (permalink / raw)
  To: Mathieu Poirier, andersson
  Cc: linux-remoteproc, shawnguo, s.hauer, kernel, festevam, linux-imx,
	linux-arm-kernel, linux-kernel

On 4/7/2023 7:14 PM, Mathieu Poirier wrote:
> This patch fixes the kernel test robot warning reported here:
>
> https://lore.kernel.org/bpf/642f916b.pPIKZ%2Fl%2F%2Fbw8tvIH%25lkp@intel.com/T/
>
> Fixes: 408ec1ff0caa ("remoteproc: imx_dsp_rproc: Add custom memory copy implementation for i.MX DSP Cores")
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>

Tested-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>

Thanks,
Iulia


> ---
>
> Iuliana - please thest this on your side
>
> ---
>   drivers/remoteproc/imx_dsp_rproc.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
> index 21759d9e5b7b..c805cb83cacc 100644
> --- a/drivers/remoteproc/imx_dsp_rproc.c
> +++ b/drivers/remoteproc/imx_dsp_rproc.c
> @@ -750,12 +750,12 @@ static void imx_dsp_rproc_kick(struct rproc *rproc, int vqid)
>    * The IRAM is part of the HiFi DSP.
>    * According to hw specs only 32-bits writes are allowed.
>    */
> -static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size)
> +static int imx_dsp_rproc_memcpy(void *dst, const void *src, size_t size)
>   {
> +	void __iomem *dest = (void __iomem *)dst;
>   	const u8 *src_byte = src;
>   	const u32 *source = src;
>   	u32 affected_mask;
> -	u32 *dst = dest;
>   	int i, q, r;
>   	u32 tmp;
>   
> @@ -768,7 +768,7 @@ static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size)
>   
>   	/* copy data in units of 32 bits at a time */
>   	for (i = 0; i < q; i++)
> -		writel(source[i], &dst[i]);
> +		writel(source[i], dest + i * 4);
>   
>   	if (r) {
>   		affected_mask = GENMASK(8 * r, 0);
> @@ -799,8 +799,8 @@ static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size)
>    */
>   static int imx_dsp_rproc_memset(void *addr, u8 value, size_t size)
>   {
> +	void __iomem *tmp_dst = (void __iomem *)addr;
>   	u32 tmp_val = value;
> -	u32 *tmp_dst = addr;
>   	u32 affected_mask;
>   	int q, r;
>   	u32 tmp;

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning
  2023-04-10 23:28 ` Iuliana Prodan
@ 2023-04-11 17:22   ` Mathieu Poirier
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Poirier @ 2023-04-11 17:22 UTC (permalink / raw)
  To: Iuliana Prodan
  Cc: andersson, linux-remoteproc, shawnguo, s.hauer, kernel, festevam,
	linux-imx, linux-arm-kernel, linux-kernel

On Tue, Apr 11, 2023 at 02:28:34AM +0300, Iuliana Prodan wrote:
> On 4/7/2023 7:14 PM, Mathieu Poirier wrote:
> > This patch fixes the kernel test robot warning reported here:
> > 
> > https://lore.kernel.org/bpf/642f916b.pPIKZ%2Fl%2F%2Fbw8tvIH%25lkp@intel.com/T/
> > 
> > Fixes: 408ec1ff0caa ("remoteproc: imx_dsp_rproc: Add custom memory copy implementation for i.MX DSP Cores")
> > Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> 
> Tested-by: Iuliana Prodan <iuliana.prodan@nxp.com>
> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
>

Applied

> Thanks,
> Iulia
> 
> 
> > ---
> > 
> > Iuliana - please thest this on your side
> > 
> > ---
> >   drivers/remoteproc/imx_dsp_rproc.c | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
> > index 21759d9e5b7b..c805cb83cacc 100644
> > --- a/drivers/remoteproc/imx_dsp_rproc.c
> > +++ b/drivers/remoteproc/imx_dsp_rproc.c
> > @@ -750,12 +750,12 @@ static void imx_dsp_rproc_kick(struct rproc *rproc, int vqid)
> >    * The IRAM is part of the HiFi DSP.
> >    * According to hw specs only 32-bits writes are allowed.
> >    */
> > -static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size)
> > +static int imx_dsp_rproc_memcpy(void *dst, const void *src, size_t size)
> >   {
> > +	void __iomem *dest = (void __iomem *)dst;
> >   	const u8 *src_byte = src;
> >   	const u32 *source = src;
> >   	u32 affected_mask;
> > -	u32 *dst = dest;
> >   	int i, q, r;
> >   	u32 tmp;
> > @@ -768,7 +768,7 @@ static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size)
> >   	/* copy data in units of 32 bits at a time */
> >   	for (i = 0; i < q; i++)
> > -		writel(source[i], &dst[i]);
> > +		writel(source[i], dest + i * 4);
> >   	if (r) {
> >   		affected_mask = GENMASK(8 * r, 0);
> > @@ -799,8 +799,8 @@ static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size)
> >    */
> >   static int imx_dsp_rproc_memset(void *addr, u8 value, size_t size)
> >   {
> > +	void __iomem *tmp_dst = (void __iomem *)addr;
> >   	u32 tmp_val = value;
> > -	u32 *tmp_dst = addr;
> >   	u32 affected_mask;
> >   	int q, r;
> >   	u32 tmp;

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-11 17:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-07 16:14 [PATCH] remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning Mathieu Poirier
2023-04-10 23:28 ` Iuliana Prodan
2023-04-11 17:22   ` 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).