[PATCH 06/11] soc: ti: knav_qmss: Fix __iomem annotations and __be32 type
Andrew Davis
afd at ti.com
Fri May 8 12:30:03 PDT 2026
On 5/8/26 12:36 PM, Nishanth Menon wrote:
> 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
It is a "void", should be "u32", that is why you are having to cast here,
not the iomem part.
Andrew
> 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.
>
More information about the linux-arm-kernel
mailing list