Skip to content

Commit

Permalink
usb: ehci-mv: Fix missing iomem in cast
Browse files Browse the repository at this point in the history
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 *

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200103164031.4089-1-krzk@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Krzysztof Kozlowski authored and Greg Kroah-Hartman committed Jan 8, 2020
1 parent 7b7ad03 commit 6082678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/host/ehci-mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,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);
Expand Down

0 comments on commit 6082678

Please sign in to comment.