Patchwork [03/10] usb-ehci: remove unused variables

login
register
mail settings
Submitter Michael S. Tsirkin
Date June 14, 2011, 5:35 p.m.
Message ID <7ec91cd83a2f953892e91bd69d23fbe233e09c11.1308072799.git.mst@redhat.com>
Download mbox | patch
Permalink /patch/100450/
State New
Headers show

Comments

Michael S. Tsirkin - June 14, 2011, 5:35 p.m.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/usb-ehci.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)
Gerd Hoffmann - June 15, 2011, 6:45 a.m.
On 06/14/11 19:35, Michael S. Tsirkin wrote:
> Signed-off-by: Michael S. Tsirkin<mst@redhat.com>

usb patch queue has a simliar fix already.
I'd suggest to drop this to reduce merge conflicts.

cheers,
   Gerd

Patch

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;