[PATCH v2] usb: host: xhci-hub: drop redundant PORTSC register read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <s.shtylyov@xxxxxx>

---
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(-)

Index: usb/drivers/usb/host/xhci-hub.c
===================================================================
--- usb.orig/drivers/usb/host/xhci-hub.c
+++ usb/drivers/usb/host/xhci-hub.c
@@ -1522,8 +1522,6 @@ int xhci_hub_control(struct usb_hcd *hcd
 		default:
 			goto error;
 		}
-		/* unblock any posted writes */
-		temp = readl(ports[wIndex]->addr);
 		break;
 	case ClearPortFeature:
 		if (!wIndex || wIndex > max_ports)



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux