scsi: qla1280: Fix compiler warnings (DEBUG mode)
Building the qla1280 driver with DEBUG_QLA1280 set will emit compiler warnings. Fix some print formatting strings to reflect the correct type of printed variables as well as remove unused code. (static function ql1280_dump_device) in order to avoid compiler warnings. [mkp: fixed a few more checkpatch warnings] Signed-off-by: Magnus Lindholm <linmag7@gmail.com> Link: https://patch.msgid.link/20251002052604.24590-1-linmag7@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
36e6daa543
commit
ea0e278a5c
@@ -2799,7 +2799,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
|
|||||||
|
|
||||||
dprintk(2, "start: cmd=%p sp=%p CDB=%xm, handle %lx\n", cmd, sp,
|
dprintk(2, "start: cmd=%p sp=%p CDB=%xm, handle %lx\n", cmd, sp,
|
||||||
cmd->cmnd[0], (long)CMD_HANDLE(sp->cmd));
|
cmd->cmnd[0], (long)CMD_HANDLE(sp->cmd));
|
||||||
dprintk(2, " bus %i, target %i, lun %i\n",
|
dprintk(2, " bus %i, target %i, lun %llu\n",
|
||||||
SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd));
|
SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd));
|
||||||
qla1280_dump_buffer(2, cmd->cmnd, MAX_COMMAND_SIZE);
|
qla1280_dump_buffer(2, cmd->cmnd, MAX_COMMAND_SIZE);
|
||||||
|
|
||||||
@@ -2871,7 +2871,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
|
|||||||
remseg--;
|
remseg--;
|
||||||
}
|
}
|
||||||
dprintk(5, "qla1280_64bit_start_scsi: Scatter/gather "
|
dprintk(5, "qla1280_64bit_start_scsi: Scatter/gather "
|
||||||
"command packet data - b %i, t %i, l %i \n",
|
"command packet data - b %i, t %i, l %llu\n",
|
||||||
SCSI_BUS_32(cmd), SCSI_TCN_32(cmd),
|
SCSI_BUS_32(cmd), SCSI_TCN_32(cmd),
|
||||||
SCSI_LUN_32(cmd));
|
SCSI_LUN_32(cmd));
|
||||||
qla1280_dump_buffer(5, (char *)pkt,
|
qla1280_dump_buffer(5, (char *)pkt,
|
||||||
@@ -2929,14 +2929,14 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
|
|||||||
remseg -= cnt;
|
remseg -= cnt;
|
||||||
dprintk(5, "qla1280_64bit_start_scsi: "
|
dprintk(5, "qla1280_64bit_start_scsi: "
|
||||||
"continuation packet data - b %i, t "
|
"continuation packet data - b %i, t "
|
||||||
"%i, l %i \n", SCSI_BUS_32(cmd),
|
"%i, l %llu\n", SCSI_BUS_32(cmd),
|
||||||
SCSI_TCN_32(cmd), SCSI_LUN_32(cmd));
|
SCSI_TCN_32(cmd), SCSI_LUN_32(cmd));
|
||||||
qla1280_dump_buffer(5, (char *)pkt,
|
qla1280_dump_buffer(5, (char *)pkt,
|
||||||
REQUEST_ENTRY_SIZE);
|
REQUEST_ENTRY_SIZE);
|
||||||
}
|
}
|
||||||
} else { /* No data transfer */
|
} else { /* No data transfer */
|
||||||
dprintk(5, "qla1280_64bit_start_scsi: No data, command "
|
dprintk(5, "qla1280_64bit_start_scsi: No data, command "
|
||||||
"packet data - b %i, t %i, l %i \n",
|
"packet data - b %i, t %i, l %llu\n",
|
||||||
SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd));
|
SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd));
|
||||||
qla1280_dump_buffer(5, (char *)pkt, REQUEST_ENTRY_SIZE);
|
qla1280_dump_buffer(5, (char *)pkt, REQUEST_ENTRY_SIZE);
|
||||||
}
|
}
|
||||||
@@ -3655,7 +3655,7 @@ qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt,
|
|||||||
|
|
||||||
dprintk(2, "qla1280_status_entry: Check "
|
dprintk(2, "qla1280_status_entry: Check "
|
||||||
"condition Sense data, b %i, t %i, "
|
"condition Sense data, b %i, t %i, "
|
||||||
"l %i\n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd),
|
"l %llu\n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd),
|
||||||
SCSI_LUN_32(cmd));
|
SCSI_LUN_32(cmd));
|
||||||
if (sense_sz)
|
if (sense_sz)
|
||||||
qla1280_dump_buffer(2,
|
qla1280_dump_buffer(2,
|
||||||
@@ -3955,7 +3955,7 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd)
|
|||||||
|
|
||||||
sp = scsi_cmd_priv(cmd);
|
sp = scsi_cmd_priv(cmd);
|
||||||
printk("SCSI Command @= 0x%p, Handle=0x%p\n", cmd, CMD_HANDLE(cmd));
|
printk("SCSI Command @= 0x%p, Handle=0x%p\n", cmd, CMD_HANDLE(cmd));
|
||||||
printk(" chan=%d, target = 0x%02x, lun = 0x%02x, cmd_len = 0x%02x\n",
|
printk(" chan=%d, target = 0x%02x, lun = 0x%02llx, cmd_len = 0x%02x\n",
|
||||||
SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd),
|
SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd),
|
||||||
CMD_CDBLEN(cmd));
|
CMD_CDBLEN(cmd));
|
||||||
printk(" CDB = ");
|
printk(" CDB = ");
|
||||||
@@ -3976,29 +3976,6 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd)
|
|||||||
printk(" underflow size = 0x%x, direction=0x%x\n",
|
printk(" underflow size = 0x%x, direction=0x%x\n",
|
||||||
cmd->underflow, cmd->sc_data_direction);
|
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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user