* [Qemu-devel] [PATCH] scsi-generic: fix debug print compiling error
@ 2014-08-21 12:19 arei.gonglei
2014-08-21 13:39 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: arei.gonglei @ 2014-08-21 12:19 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, Gonglei, weidong.huang
From: Gonglei <arei.gonglei@huawei.com>
variables lun and tag had been eliminated, broke compiling
when enable debug switch.
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
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]);
#ifdef DEBUG_SCSI
{
--
1.7.12.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] scsi-generic: fix debug print compiling error
2014-08-21 12:19 [Qemu-devel] [PATCH] scsi-generic: fix debug print compiling error arei.gonglei
@ 2014-08-21 13:39 ` Paolo Bonzini
2014-08-21 14:36 ` Gonglei
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2014-08-21 13:39 UTC (permalink / raw)
To: arei.gonglei, qemu-devel; +Cc: weidong.huang
Il 21/08/2014 14:19, arei.gonglei@huawei.com ha scritto:
> From: Gonglei <arei.gonglei@huawei.com>
>
> variables lun and tag had been eliminated, broke compiling
> when enable debug switch.
>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
> 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
> {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] scsi-generic: fix debug print compiling error
2014-08-21 13:39 ` Paolo Bonzini
@ 2014-08-21 14:36 ` Gonglei
0 siblings, 0 replies; 3+ messages in thread
From: Gonglei @ 2014-08-21 14:36 UTC (permalink / raw)
To: 'Paolo Bonzini', arei.gonglei, qemu-devel; +Cc: weidong.huang
> Subject: Re: [Qemu-devel] [PATCH] scsi-generic: fix debug print compiling error
>
> Il 21/08/2014 14:19, arei.gonglei@huawei.com ha scritto:
> > From: Gonglei <arei.gonglei@huawei.com>
> >
> > variables lun and tag had been eliminated, broke compiling
> > when enable debug switch.
> >
> > Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> > ---
> > 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).
>
OK, thanks! v2 will do.
Best regards,
-Gonglei
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-21 14:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21 12:19 [Qemu-devel] [PATCH] scsi-generic: fix debug print compiling error arei.gonglei
2014-08-21 13:39 ` Paolo Bonzini
2014-08-21 14:36 ` Gonglei
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.