[PATCH 06/11] soc: ti: knav_qmss: Fix __iomem annotations and __be32 type
Nishanth Menon
nm at ti.com
Fri May 8 10:36:43 PDT 2026
On 12:14-20260508, Andrew Davis wrote:
[...]
> > writel_relaxed(val, &pdsp->regs->control);
> > /* wait for command register to clear */
> > - ret = knav_queue_pdsp_wait(pdsp->command, timeout, 0);
> > + ret = knav_queue_pdsp_wait((u32 __iomem *)pdsp->command, timeout, 0);
>
> Why not make `command`'s type `u32 __iomem *` instead of casting it when used?
pdsp->command is __iomem *, from what I see, from
devm_io_remap_resource(), writel/readl_relaxed and other usage where
void __iomem* is used with command, and arithmetic used across the code,
__iomem * is intentional, except for this case. i did think of making
knav_queue_pdsp_wait take iomem, but that'd weaken what the strict
checking of a single u32 reg access it does.. this approach looked the
better of the alternatives.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
https://ti.com/opensource
More information about the linux-arm-kernel
mailing list