From patchwork Mon Nov 21 13:39:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 126813 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4F55BB700E for ; Tue, 22 Nov 2011 02:08:55 +1100 (EST) Received: from localhost ([::1]:32909 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSU7H-00057i-A9 for incoming@patchwork.ozlabs.org; Mon, 21 Nov 2011 08:40:59 -0500 Received: from eggs.gnu.org ([140.186.70.92]:53634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSU6g-0003PA-Um for qemu-devel@nongnu.org; Mon, 21 Nov 2011 08:40:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSU6S-0000jR-5m for qemu-devel@nongnu.org; Mon, 21 Nov 2011 08:40:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:22520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSU6R-0000ii-OP for qemu-devel@nongnu.org; Mon, 21 Nov 2011 08:40:07 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pALDe6TV003504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Nov 2011 08:40:06 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-20.ams2.redhat.com [10.36.116.20]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pALDe3N8029217; Mon, 21 Nov 2011 08:40:04 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id A236340220; Mon, 21 Nov 2011 14:40:02 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 21 Nov 2011 14:39:55 +0100 Message-Id: <1321882802-3337-2-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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, Gerd Hoffmann Subject: [Qemu-devel] [PATCH 1/8] usb-storage: move status debug message to usb_msd_send_status. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; }