From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKSai-0006de-Uy for qemu-devel@nongnu.org; Thu, 21 Aug 2014 09:39:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKSae-0000ak-11 for qemu-devel@nongnu.org; Thu, 21 Aug 2014 09:39:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKSad-0000ZQ-QE for qemu-devel@nongnu.org; Thu, 21 Aug 2014 09:39:43 -0400 Message-ID: <53F5F675.8010603@redhat.com> Date: Thu, 21 Aug 2014 15:39:01 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1408623593-4640-1-git-send-email-arei.gonglei@huawei.com> In-Reply-To: <1408623593-4640-1-git-send-email-arei.gonglei@huawei.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] scsi-generic: fix debug print compiling error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com, qemu-devel@nongnu.org Cc: weidong.huang@huawei.com Il 21/08/2014 14:19, arei.gonglei@huawei.com ha scritto: > From: Gonglei > > variables lun and tag had been eliminated, broke compiling > when enable debug switch. > > Signed-off-by: Gonglei > --- > hw/scsi/scsi-generic.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c > index 0b2ff90..3808694 100644 > --- a/hw/scsi/scsi-generic.c > +++ b/hw/scsi/scsi-generic.c > @@ -303,8 +303,7 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd) > SCSIDevice *s = r->req.dev; > int ret; > > - DPRINTF("Command: lun=%d tag=0x%x len %zd data=0x%02x", lun, tag, > - r->req.cmd.xfer, cmd[0]); > + DPRINTF("Command: len %zd data=0x%02x\n", r->req.cmd.xfer, cmd[0]); You can use r->req.tag (but traces provide the same information really, so I'd also accept a patch to remove superfluous DPRINTFs that keep breaking). Paolo > #ifdef DEBUG_SCSI > { >