From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSU6Z-0003AJ-KQ for qemu-devel@nongnu.org; Mon, 21 Nov 2011 08:40:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSU6S-0000jW-5u for qemu-devel@nongnu.org; Mon, 21 Nov 2011 08:40:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSU6R-0000iY-ON for qemu-devel@nongnu.org; Mon, 21 Nov 2011 08:40:07 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pALDe6kw013176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Nov 2011 08:40:06 -0500 From: Gerd Hoffmann Date: Mon, 21 Nov 2011 14:39:58 +0100 Message-Id: <1321882802-3337-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1321882802-3337-1-git-send-email-kraxel@redhat.com> References: <1321882802-3337-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 4/8] usb-storage: drop result from device state. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- 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 089c23c..6f32a0e 100644 --- a/hw/usb-msd.c +++ b/hw/usb-msd.c @@ -59,7 +59,6 @@ typedef struct { char *serial; SCSIDevice *scsi_dev; uint32_t removable; - int result; /* For async completion. */ USBPacket *packet; } MSDState; @@ -231,12 +230,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.1