diff mbox

[1/8] usb-storage: move status debug message to usb_msd_send_status.

Message ID 1321882802-3337-2-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Nov. 21, 2011, 1:39 p.m. UTC
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 <kraxel@redhat.com>
---
 hw/usb-msd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index b734177..8dde421 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -194,6 +194,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->iov.size);
     csw.sig = cpu_to_le32(0x53425355);
     csw.tag = cpu_to_le32(s->tag);
     csw.residue = s->residue;
@@ -432,8 +434,6 @@  static int usb_msd_handle_data(USBDevice *dev, USBPacket *p)
             break;
 
         case USB_MSDM_CSW:
-            DPRINTF("Command status %d tag 0x%x, len %zd\n",
-                    s->result, s->tag, p->iov.size);
             if (p->iov.size < 13) {
                 goto fail;
             }