]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
phy: marvell: mmp3-hsic: Avoid re-casting __iomem
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Mon, 16 Feb 2026 11:04:15 +0000 (12:04 +0100)
committerVinod Koul <vkoul@kernel.org>
Fri, 27 Feb 2026 14:33:38 +0000 (20:03 +0530)
commitc77eee5b44b8d32d471cf17fa193b395e321ef37
tree98991e90fd8321f3fcf99a2321c41878401280b8
parentb3fddddf3fb49c7472e73680d6ea5d771f9514e8
phy: marvell: mmp3-hsic: Avoid re-casting __iomem

__iomem annotated memory must be accessed via dedicated accessors, even
if actual code is correct (accessing the driver data in
mmp3_hsic_phy_init() brings back the __iomem cast), but dropping its
cast (with or without __force) when storing as driver data seems like
less readable code for any future changes.  Instead, add a dedicated
wrapping structure just to hold the pointer without changing the __iomem
cast.  This makes the code explicit, obvious and solves the sparse
warning:

  phy-mmp3-hsic.c:58:31: warning: cast removes address space '__iomem' of expression

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260216110413.159994-5-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/marvell/phy-mmp3-hsic.c