Skip to contentSkip to conversation

usb: ehci-mv: Fix missing iomem in cast

PATCH New Krzysztof Kozlowski 1 participant 1 message Jan 3, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: ehci-mv: Fix missing iomem in cast

Fix missing __iomem in cast to struct ehci_caps. This fixes the Sparse warning visible on x86_64 compile test:

drivers/usb/host/ehci-mv.c:167:23: warning: cast removes address space '<asn:2>' of expression drivers/usb/host/ehci-mv.c:167:20: warning: incorrect type in assignment (different address spaces)
drivers/usb/host/ehci-mv.c:167:20: expected struct ehci_caps [noderef] <asn:2> *caps
drivers/usb/host/ehci-mv.c:167:20: got struct ehci_caps *

---
 drivers/usb/host/ehci-mv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ehci-mv.c +1 -1
index 66ec1fdf9fe7..16df3cfbed26 100644
@@ -164,7 +164,7 @@ static int mv_ehci_probe(struct platform_device *pdev)
 	}
 
 	ehci = hcd_to_ehci(hcd);
-	ehci->caps = (struct ehci_caps *) ehci_mv->cap_regs;
+	ehci->caps = (struct ehci_caps __iomem *) ehci_mv->cap_regs;
 
 	if (ehci_mv->mode == MV_USB_MODE_OTG) {
 		ehci_mv->otg = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
Signature · 1 line
2.17.1