Commit 3c497f62 authored by Mathieu Poirier's avatar Mathieu Poirier

remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning

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: 408ec1ff ("remoteproc: imx_dsp_rproc: Add custom memory copy implementation for i.MX DSP Cores")
Link: https://lore.kernel.org/r/20230407161429.3973177-1-mathieu.poirier@linaro.orgTested-by: default avatarIuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: default avatarIuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent 5de6ef49
...@@ -746,12 +746,12 @@ static void imx_dsp_rproc_kick(struct rproc *rproc, int vqid) ...@@ -746,12 +746,12 @@ static void imx_dsp_rproc_kick(struct rproc *rproc, int vqid)
* The IRAM is part of the HiFi DSP. * The IRAM is part of the HiFi DSP.
* According to hw specs only 32-bits writes are allowed. * 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 u8 *src_byte = src;
const u32 *source = src; const u32 *source = src;
u32 affected_mask; u32 affected_mask;
u32 *dst = dest;
int i, q, r; int i, q, r;
u32 tmp; u32 tmp;
...@@ -764,7 +764,7 @@ static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size) ...@@ -764,7 +764,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 */ /* copy data in units of 32 bits at a time */
for (i = 0; i < q; i++) for (i = 0; i < q; i++)
writel(source[i], &dst[i]); writel(source[i], dest + i * 4);
if (r) { if (r) {
affected_mask = GENMASK(8 * r, 0); affected_mask = GENMASK(8 * r, 0);
...@@ -795,8 +795,8 @@ static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size) ...@@ -795,8 +795,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) 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_val = value;
u32 *tmp_dst = addr;
u32 affected_mask; u32 affected_mask;
int q, r; int q, r;
u32 tmp; u32 tmp;
......
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