[PATCHv2 0/4] dma: fsl_raid: fix sparse warnings and simplify probing

Rosen Penev posted 4 patches 1 week, 1 day ago
drivers/dma/fsl_raid.c | 58 ++++++++++++++++++++----------------------
drivers/dma/fsl_raid.h |  4 +--
2 files changed, 30 insertions(+), 32 deletions(-)
[PATCHv2 0/4] dma: fsl_raid: fix sparse warnings and simplify probing
Posted by Rosen Penev 1 week, 1 day ago
This series cleans up the fsl_raid driver to address issues reported by
sparse and to simplify its MMIO handling.

Patch 1 fixes the endianness of in-memory descriptor stores. The
descriptor structs are handed to the device as big-endian, but the driver
stored CPU-endian values directly, which is both incorrect and flagged by
sparse as a base-type mismatch. The stores are wrapped in cpu_to_be32()
and the final-frame bit is now passed as an argument rather than
read-modify-written.

Patch 2 keeps the MMIO bases (re_regs and jrregs) as void __iomem *
instead of typed register struct pointers, eliminating "different address
spaces" sparse warnings on every register access. Each accessor derives a
local __iomem-qualified typed pointer.

Patch 3 replaces the open-coded platform_get_resource() +
devm_ioremap() sequence with devm_platform_ioremap_resource().

v2: split up first patch and simplify __iomem patch.

Rosen Penev (4):
  dma: fsl_raid: convert descriptor stores to big-endian
  dma: fsl_raid: set final bit via fill_cfd_frame() argument
  dma: fsl_raid: keep MMIO bases as void __iomem and cast at access
  dma: fsl_raid: use devm_platform_ioremap_resource

 drivers/dma/fsl_raid.c | 58 ++++++++++++++++++++----------------------
 drivers/dma/fsl_raid.h |  4 +--
 2 files changed, 30 insertions(+), 32 deletions(-)

-- 
2.55.0
Re: [PATCHv2 0/4] dma: fsl_raid: fix sparse warnings and simplify probing
Posted by Vinod Koul 1 week, 1 day ago
On Thu, 16 Jul 2026 13:29:45 -0700, Rosen Penev wrote:
> This series cleans up the fsl_raid driver to address issues reported by
> sparse and to simplify its MMIO handling.
> 
> Patch 1 fixes the endianness of in-memory descriptor stores. The
> descriptor structs are handed to the device as big-endian, but the driver
> stored CPU-endian values directly, which is both incorrect and flagged by
> sparse as a base-type mismatch. The stores are wrapped in cpu_to_be32()
> and the final-frame bit is now passed as an argument rather than
> read-modify-written.
> 
> [...]

Applied, thanks!

[1/4] dma: fsl_raid: convert descriptor stores to big-endian
      commit: faa4ddedab7d75e0f28e2d14c14a428664deeb90
[2/4] dma: fsl_raid: set final bit via fill_cfd_frame() argument
      commit: 416e9fd2059631405031aaa033a7a7851467be86
[3/4] dma: fsl_raid: keep MMIO bases as void __iomem and cast at access
      commit: 68b7fbc235290937e4e2daa097896b6b94618f15
[4/4] dma: fsl_raid: use devm_platform_ioremap_resource
      commit: 30cb1b9fd4295f54d22b3a15ecf8525c9fe03ebe

Best regards,
-- 
~Vinod