[PATCH] reset: anlogic: dr1v90: add __iomem cast for base from platform_data

From: Junhui Liu

Date: Fri Oct 02 2026 - 02:03:42 EST


Kernel test robot reports:

drivers/reset/reset-dr1v90.c:114:20: sparse: sparse: incorrect type in assignment (different address spaces)
drivers/reset/reset-dr1v90.c:114:20: sparse: expected void [noderef] __iomem *base
drivers/reset/reset-dr1v90.c:114:20: sparse: got void *platform_data

The register base is passed from the CRU driver to the reset auxiliary
device via platform_data, which is a plain void *, while rstc->base is
void __iomem *. Add an explicit cast to restore the address space
annotation.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202609302313.Ux3U0CdC-lkp@xxxxxxxxx/
Fixes: 9fd565971072 ("reset: anlogic: add support for Anlogic DR1V90 resets")
Signed-off-by: Junhui Liu <junhui.liu@xxxxxxxxxxxxx>
---
This based on linux-next (next-20261001).
---
drivers/reset/reset-dr1v90.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/reset/reset-dr1v90.c b/drivers/reset/reset-dr1v90.c
index daa99c797b1a..317aa4ebe3d8 100644
--- a/drivers/reset/reset-dr1v90.c
+++ b/drivers/reset/reset-dr1v90.c
@@ -111,7 +111,7 @@ static int dr1v90_reset_probe(struct auxiliary_device *adev,

spin_lock_init(&rstc->lock);

- rstc->base = dev->platform_data;
+ rstc->base = (void __iomem *)dev->platform_data;
rstc->rcdev.dev = dev;
rstc->rcdev.nr_resets = ARRAY_SIZE(dr1v90_resets);
rstc->rcdev.of_node = dev->parent->of_node;

---
base-commit: 9f24d789f03b22941b905ded43cb5ff8eea9ce62
change-id: 20261001-dr1v90-cru-sparse-fix-f37b4b85ffa0

Best regards,
--
Junhui Liu <junhui.liu@xxxxxxxxxxxxx>