Skip to contentSkip to conversation

scsi-generic: fix debug print compiling error

PATCH In review [email protected] 3 participants 3 messages Aug 21, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi-generic: fix debug print compiling error

From: Gonglei <[email protected]>

variables lun and tag had been eliminated, broke compiling when enable debug switch.

---
 hw/scsi/scsi-generic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
hw/scsi/scsi-generic.c +1 -2
index 0b2ff90..3808694 100644
@@ -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
     {
Signature · 1 line
1.7.12.4
#1 lore raw

Il 21/08/2014 14:19, [email protected] ha scritto:

Quoted 15 lines

From: Gonglei <[email protected]>

variables lun and tag had been eliminated, broke compiling when enable debug switch.

---
 hw/scsi/scsi-generic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
hw/scsi/scsi-generic.c +0 -0
index 0b2ff90..3808694 100644

hw/scsi/scsi-generic.c static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd) · line 306

Quoted 6 lines
hw/scsi/scsi-generic.c +1 -2
@@ -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

Quoted 3 lines
hw/scsi/scsi-generic.c +0 -0
 #ifdef DEBUG_SCSI
     {
 
#2 lore raw
Quoted 23 lines

Subject: Re: [Qemu-devel] [PATCH] scsi-generic: fix debug print compiling error

Il 21/08/2014 14:19, [email protected] ha scritto:

hw/scsi/scsi-generic.c static int32_t scsi_send_command(SCSIRequest

Quoted 15 lines

From: Gonglei <[email protected]>

variables lun and tag had been eliminated, broke compiling when enable debug switch.

---
 hw/scsi/scsi-generic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
hw/scsi/scsi-generic.c +0 -0
index 0b2ff90..3808694 100644
@@ -303,8 +303,7 @@ static int32_t scsi_send_command(SCSIRequest

*req, uint8_t *cmd)

hw/scsi/scsi-generic.c static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd)

Quoted 4 lines
hw/scsi/scsi-generic.c +0 -1
     SCSIDevice *s = r->req.dev;
     int ret;
 
-    DPRINTF("Command: lun=%d tag=0x%x len %zd data=0x%02x", lun,
Quoted 9 lines

tag,

hw/scsi/scsi-generic.c static int32_t scsi_send_command(SCSIRequest · line 306

Quoted 2 lines
hw/scsi/scsi-generic.c +1 -1
-            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