Received: from eggs.gnu.org ([2001:4830:134:3::10]:40547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTdQR-0003I6-UP for qemu-devel@nongnu.org; Tue, 08 Oct 2013 15:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTdQM-0004qo-0A for qemu-devel@nongnu.org; Tue, 08 Oct 2013 15:58:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTdQL-0004qa-OJ for qemu-devel@nongnu.org; Tue, 08 Oct 2013 15:58:29 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r98JwSBE019339 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Oct 2013 15:58:29 -0400 From: Hans de Goede Date: Tue, 8 Oct 2013 21:58:10 +0200 Message-Id: <1381262298-3241-6-git-send-email-hdegoede@redhat.com> In-Reply-To: <1381262298-3241-1-git-send-email-hdegoede@redhat.com> References: <1381262298-3241-1-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] [PATCH 05/13] usb-hcd-xhci: Remove unused cancelled member from XHCITransfer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Hans de Goede , qemu-devel@nongnu.org Since qemu's USB model is geared towards emulated devices cancellation is instanteneous, so no need to wait for cancellation to complete, as such there is no wait for cancellation code, and the cancelled bool as well as the bogus comment about it can be removed. Signed-off-by: Hans de Goede --- hw/usb/hcd-xhci.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index e078c50..7cf89ce 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -346,7 +346,6 @@ typedef struct XHCITransfer { QEMUSGList sgl; bool running_async; bool running_retry; - bool cancelled; bool complete; bool int_req; unsigned int iso_pkts; @@ -1310,8 +1309,6 @@ static int xhci_ep_nuke_one_xfer(XHCITransfer *t) if (t->running_async) { usb_cancel_packet(&t->packet); t->running_async = 0; - t->cancelled = 1; - DPRINTF("xhci: cancelling transfer, waiting for it to complete\n"); killed = 1; } if (t->running_retry) { @@ -1728,14 +1725,12 @@ static int xhci_complete_packet(XHCITransfer *xfer) xfer->running_async = 1; xfer->running_retry = 0; xfer->complete = 0; - xfer->cancelled = 0; return 0; } else if (xfer->packet.status == USB_RET_NAK) { trace_usb_xhci_xfer_nak(xfer); xfer->running_async = 0; xfer->running_retry = 1; xfer->complete = 0; - xfer->cancelled = 0; return 0; } else { xfer->running_async = 0; -- 1.8.3.1