Received: from eggs.gnu.org ([140.186.70.92]:57461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSWmu-00060E-1l for qemu-devel@nongnu.org; Mon, 21 Nov 2011 11:32:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSWmp-0007Ye-4w for qemu-devel@nongnu.org; Mon, 21 Nov 2011 11:32:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSWmo-0007YM-Ra for qemu-devel@nongnu.org; Mon, 21 Nov 2011 11:32:03 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pALGW2l4004660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Nov 2011 11:32:02 -0500 From: Gerd Hoffmann Date: Mon, 21 Nov 2011 17:15:42 +0100 Message-Id: <1321892148-16835-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1321892148-16835-1-git-send-email-kraxel@redhat.com> References: <1321892148-16835-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/7] usb-storage: move status debug message to usb_msd_send_status. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: 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 --- 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 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; } -- 1.7.1