Re: [PATCH 09/10] remoteproc: imx_dsp_rproc: Fix pointer stride in imx_dsp_rproc_memset()

From: Peng Fan (OSS)

Date: Mon Nov 23 2026 - 22:29:05 EST


On Mon, 23 Nov 2026 17:20:53 +0000 Lee Jones <lee@xxxxxxxxxx> wrote:

> Commit 3c497f624d40 ("remoteproc: imx_dsp_rproc: Fix kernel test robot
> sparse warning") changed tmp_dst from u32 * to void __iomem *. In GNU
> C, incrementing a void pointer advances it by 1 byte rather than 4
> bytes. Consequently, the word-fill loop in imx_dsp_rproc_memset()
> steps by 1 byte per 32-bit writel(), triggering unaligned 32-bit MMIO
> accesses on Device-mapped DSP IRAM, mispositioning tmp_dst for the
> trailing-byte read-modify-write, and leaving roughly three quarters of
> the target region uninitialised.
>
> Advance tmp_dst by 4 bytes per 32-bit word write.
>
> Fixes: 3c497f624d40 ("remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning")
> Closes: https://sashiko.dev/#/bug/linux-720f943f-eefd-4df7-806e-0b50cad1abbe
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>

Reviewed-by: Peng Fan <peng.fan@xxxxxxx>