From 7b064cc6c156e349208d138254fcac5c9292369f Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Wed, 22 Feb 2012 14:11:44 +0100
Subject: [PATCH 028/109] usb-storage: drop result from device state.

RH-Author: Paolo Bonzini <pbonzini@redhat.com>
Message-id: <1329919979-20948-28-git-send-email-pbonzini@redhat.com>
Patchwork-id: 37506
O-Subject: [RHEL 6.3 qemu-kvm PATCH v2 027/102] usb-storage: drop result from device state.
Bugzilla: 782029
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>

From: Gerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from 414c460431036bdadea8120d056c7e493bb60fb9)
---
 hw/usb-msd.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 hw/usb-msd.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index dbea6c7..977d809 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -61,7 +61,6 @@ typedef struct {
     char *serial;
     SCSIDevice *scsi_dev;
     uint32_t removable;
-    int result;
     /* For async completion.  */
     USBPacket *packet;
 } MSDState;
@@ -238,12 +237,11 @@ static void usb_msd_command_complete(SCSIRequest *req, uint32_t status)
 
     DPRINTF("Command complete %d tag 0x%x\n", status, req->tag);
     s->residue = s->data_len;
-    s->result = status != 0;
 
     s->csw.sig = cpu_to_le32(0x53425355);
     s->csw.tag = cpu_to_le32(req->tag);
     s->csw.residue = s->residue;
-    s->csw.status = s->result;
+    s->csw.status = status != 0;
 
     if (s->packet) {
         if (s->data_len == 0 && s->mode == USB_MSDM_DATAOUT) {
-- 
1.7.7.6

