From patchwork Tue Jun 14 17:35:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 100450 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 158E6B6F8C for ; Wed, 15 Jun 2011 09:37:08 +1000 (EST) Received: from localhost ([::1]:39825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWdAO-0001iD-LX for incoming@patchwork.ozlabs.org; Tue, 14 Jun 2011 19:37:04 -0400 Received: from eggs.gnu.org ([140.186.70.92]:38483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWXWr-00041G-85 for qemu-devel@nongnu.org; Tue, 14 Jun 2011 13:35:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWXWp-00061E-CQ for qemu-devel@nongnu.org; Tue, 14 Jun 2011 13:35:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWXWo-00060w-S0 for qemu-devel@nongnu.org; Tue, 14 Jun 2011 13:35:51 -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 p5EHZOai006619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Jun 2011 13:35:24 -0400 Received: from redhat.com (dhcp-1-35.tlv.redhat.com [10.35.1.35]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p5EHZHQI019189; Tue, 14 Jun 2011 13:35:18 -0400 Date: Tue, 14 Jun 2011 20:35:36 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <7ec91cd83a2f953892e91bd69d23fbe233e09c11.1308072799.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mutt-Fcc: =sent User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 X-Mailman-Approved-At: Tue, 14 Jun 2011 19:32:52 -0400 Cc: Kevin Wolf , Alexander Graf , Anthony Liguori , Marcelo Tosatti , Gerd Hoffmann , Stefan Hajnoczi , kvm@vger.kernel.org, "Michael S. Tsirkin" , Jan Kiszka , Riku Voipio , qemu-devel@nongnu.org, Christoph Hellwig , Blue Swirl , Alex Williamson , Isaku Yamahata , Paul Brook , Paolo Bonzini , Avi Kivity , Aurelien Jarno , Richard Henderson Subject: [Qemu-devel] [PATCH 03/10] usb-ehci: remove unused variables X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Michael S. Tsirkin --- hw/usb-ehci.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index 4d6989a..c20ee22 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -523,11 +523,8 @@ static void ehci_detach(USBPort *port) static void ehci_reset(void *opaque) { EHCIState *s = opaque; - uint8_t *pci_conf; int i; - pci_conf = s->dev.config; - memset(&s->mmio[OPREGBASE], 0x00, MMIO_SIZE - OPREGBASE); s->usbcmd = NB_MAXINTRATE << USBCMD_ITC_SH; @@ -1105,18 +1102,15 @@ static int ehci_process_itd(EHCIState *ehci, int ret; int i, j; int ptr; - int pid; int pg; int len; int dir; int devadr; int endp; - int maxpkt; dir =(itd->bufptr[1] & ITD_BUFPTR_DIRECTION); devadr = get_field(itd->bufptr[0], ITD_BUFPTR_DEVADDR); endp = get_field(itd->bufptr[0], ITD_BUFPTR_EP); - maxpkt = get_field(itd->bufptr[1], ITD_BUFPTR_MAXPKT); for(i = 0; i < 8; i++) { if (itd->transact[i] & ITD_XACT_ACTIVE) { @@ -1136,9 +1130,7 @@ static int ehci_process_itd(EHCIState *ehci, if (!dir) { cpu_physical_memory_rw(ptr, &ehci->buffer[0], len, 0); - pid = USB_TOKEN_OUT; - } else - pid = USB_TOKEN_IN; + } ret = USB_RET_NODEV;