From: Dan Williams Date: Mon, 7 Oct 2013 18:58:34 +0000 (-0700) Subject: usb: xhci: kill a conditional when toggling cycle X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~15600^2~32^2~1 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4e341818ee9ee8d435977131cc7ce9e89c053fa6;p=mirror_ubuntu-focal-kernel.git usb: xhci: kill a conditional when toggling cycle Perform an unconditional toggle of the cycle bit with 'xor'. Signed-off-by: Dan Williams Signed-off-by: Sarah Sharp --- diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index e57163f952ed..1e2f3f495843 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -178,7 +178,7 @@ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring) if (ring->type == TYPE_EVENT && last_trb_on_last_seg(xhci, ring, ring->deq_seg, ring->dequeue)) { - ring->cycle_state = (ring->cycle_state ? 0 : 1); + ring->cycle_state ^= 1; } ring->deq_seg = ring->deq_seg->next; ring->dequeue = ring->deq_seg->trbs;