usb: host: xhci-hub: drop redundant PORTSC register read
Subsystems (2)
PATCH v2 1/1 usb: host: xhci-hub: drop redundant PORTSC register read
In xhci_hub_control(), there are many PORTSC register readbacks in several branches of the *switch* statement which get duplicated right after that *switch* by reading back that register once more -- which is done to flush the posted writes. Drop that redundant PORTSC readback...
Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
Signed-off-by Sergey Shtylyov <[email protected]>
---
This patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo.
Changes in version 2:
- dropped the register readback after the *switch* not inside it, updated the patch description/subject accordingly;
- added the reigster name in the patch description/subject.
drivers/usb/host/xhci-hub.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/host/xhci-hub.c +0 -2
@@ -1522,8 +1522,6 @@ int xhci_hub_control(struct usb_hcd *hcddefault : goto error; } -/* unblock any posted writes */ - temp =readl (ports[wIndex]->addr);break ;case ClearPortFeature:if (!wIndex || wIndex > max_ports)