From f2a4bdd0829057aeeb7aebde2b6b33a69a185b25 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 22 Feb 2012 14:11:41 +0100 Subject: [PATCH 025/109] usb-storage: move status debug message to usb_msd_send_status. RH-Author: Paolo Bonzini Message-id: <1329919979-20948-25-git-send-email-pbonzini@redhat.com> Patchwork-id: 37505 O-Subject: [RHEL 6.3 qemu-kvm PATCH v2 024/102] usb-storage: move status debug message to usb_msd_send_status. Bugzilla: 782029 RH-Acked-by: Gerd Hoffmann RH-Acked-by: Laszlo Ersek RH-Acked-by: Orit Wasserman From: Gerd Hoffmann usb_msd_send_status can be called from different code paths, move the debug message into the function to make sure it is printed unconditionally. Signed-off-by: Gerd Hoffmann (cherry picked from e04da7c3d15d746be86898b4ce059b365d61dbc3) Conflicts: hw/usb-msd.c --- hw/usb-msd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Signed-off-by: Michal Novotny --- hw/usb-msd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb-msd.c b/hw/usb-msd.c index cd8ba60..ff4fd5f 100644 --- a/hw/usb-msd.c +++ b/hw/usb-msd.c @@ -202,6 +202,8 @@ static void usb_msd_send_status(MSDState *s, USBPacket *p) struct usb_msd_csw csw; int len; + DPRINTF("Command status %d tag 0x%x, len %zd\n", + s->result, s->tag, p->len); csw.sig = cpu_to_le32(0x53425355); csw.tag = cpu_to_le32(s->tag); csw.residue = s->residue; @@ -450,8 +452,6 @@ static int usb_msd_handle_data(USBDevice *dev, USBPacket *p) break; case USB_MSDM_CSW: - DPRINTF("Command status %d tag 0x%x, len %d\n", - s->result, s->tag, len); if (len < 13) goto fail; -- 1.7.7.6