Skip to contentSkip to conversation

drivers: xhci: fix incorrect bit test

PATCH In review Nickolai Zeldovich 3 participants 3 messages Jan 8, 2013 – Jan 17, 2013

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

PATCH 1/1 drivers: xhci: fix incorrect bit test

Fix incorrect bit test that originally showed up in 4ee823b83bc9851743fab756c76b27d6a1e2472b: use '&' instead of '&&'.

---
 drivers/usb/host/xhci-ring.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-ring.c +1 -1
index cbb44b7..06921b6 100644
@@ -1698,7 +1698,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
 				faked_port_index + 1);
 		if (slot_id && xhci->devs[slot_id])
 			xhci_ring_device(xhci, slot_id);
-		if (bus_state->port_remote_wakeup && (1 << faked_port_index)) {
+		if (bus_state->port_remote_wakeup & (1 << faked_port_index)) {
 			bus_state->port_remote_wakeup &=
 				~(1 << faked_port_index);
 			xhci_test_and_clear_bit(xhci, port_array,
Signature · 1 line
1.7.10.4
#1 lore raw

Hello.

Quoted 2 lines · Nickolai Zeldovich

Fix incorrect bit test that originally showed up in 4ee823b83bc9851743fab756c76b27d6a1e2472b: use '&' instead of '&&'.

Please also specify the summary of that commit in parens (or however you
like).

Quoted 1 line

WBR, Sergei

#2 lore raw
In reply to Nickolai Zeldovich

Hi Nickolai,

Thanks for catching this. Don't worry about sending a new patch with the short description for the commit, I'll fix that when I send it off.

Sarah Sharp

Quoted 24 lines · Nickolai Zeldovich

Fix incorrect bit test that originally showed up in 4ee823b83bc9851743fab756c76b27d6a1e2472b: use '&' instead of '&&'.

---
 drivers/usb/host/xhci-ring.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-ring.c +1 -1
index cbb44b7..06921b6 100644
@@ -1698,7 +1698,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
 				faked_port_index + 1);
 		if (slot_id && xhci->devs[slot_id])
 			xhci_ring_device(xhci, slot_id);
-		if (bus_state->port_remote_wakeup && (1 << faked_port_index)) {
+		if (bus_state->port_remote_wakeup & (1 << faked_port_index)) {
 			bus_state->port_remote_wakeup &=
 				~(1 << faked_port_index);
 			xhci_test_and_clear_bit(xhci, port_array,
Signature · 1 line
1.7.10.4