Thread (7 messages) 7 messages, 4 authors, 2021-08-19
STALE1773d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 2/2] scsi: qla1280: Fix DEBUG_QLA1280 compilation issues

From: John Garry <hidden>
Date: 2021-08-19 09:37:26
Also in: lkml
Subsystem: qlogic qla1280 scsi driver, scsi subsystem, the rest · Maintainers: Michael Reed, "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

The driver does not compile under DEBUG_QLA1280 flag:
- Debug statements expect an integer for printing a SCSI lun value, but
  its size is 64b. So change SCSI_LUN_32() to cast to an int, as would be
  expected from a "_32" function.
- lower_32_bits() expects %x, as opposed to %lx, so fix that.

Also delete ql1280_dump_device(), which looks to have never been
referenced.

Signed-off-by: John Garry <redacted>
---
 drivers/scsi/qla1280.c | 27 ++-------------------------
 1 file changed, 2 insertions(+), 25 deletions(-)
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index b4f7d8d7a01c..9a7e84b49d41 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -494,7 +494,7 @@ __setup("qla1280=", qla1280_setup);
 #define CMD_HOST(Cmnd)		Cmnd->device->host
 #define SCSI_BUS_32(Cmnd)	Cmnd->device->channel
 #define SCSI_TCN_32(Cmnd)	Cmnd->device->id
-#define SCSI_LUN_32(Cmnd)	Cmnd->device->lun
+#define SCSI_LUN_32(Cmnd)	((int)Cmnd->device->lun)
 
 
 /*****************************************/
@@ -3126,7 +3126,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
 			*dword_ptr++ =
 				cpu_to_le32(lower_32_bits(sg_dma_address(s)));
 			*dword_ptr++ = cpu_to_le32(sg_dma_len(s));
-			dprintk(3, "S/G Segment phys_addr=0x%lx, len=0x%x\n",
+			dprintk(3, "S/G Segment phys_addr=0x%x, len=0x%x\n",
 				(lower_32_bits(sg_dma_address(s))),
 				(sg_dma_len(s)));
 			remseg--;
@@ -3985,29 +3985,6 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd)
 	printk(" underflow size = 0x%x, direction=0x%x\n",
 	       cmd->underflow, cmd->sc_data_direction);
 }
-
-/**************************************************************************
- *   ql1280_dump_device
- *
- **************************************************************************/
-static void
-ql1280_dump_device(struct scsi_qla_host *ha)
-{
-
-	struct scsi_cmnd *cp;
-	struct srb *sp;
-	int i;
-
-	printk(KERN_DEBUG "Outstanding Commands on controller:\n");
-
-	for (i = 0; i < MAX_OUTSTANDING_COMMANDS; i++) {
-		if ((sp = ha->outstanding_cmds[i]) == NULL)
-			continue;
-		if ((cp = sp->cmd) == NULL)
-			continue;
-		qla1280_print_scsi_cmd(1, cp);
-	}
-}
 #endif
 
 
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help