scsi: qla1280.c: fix compiler warnings (DEBUG mode)
Subsystems (2)
PATCH 1/1 scsi: qla1280.c: 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.
Signed-off-by Magnus Lindholm <[email protected]>
--- drivers/scsi/qla1280.c | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-)
drivers/scsi/qla1280.c +6 -29
@@ -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, 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));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--; }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_LUN_32 (cmd)); qla1280_dump_buffer(5, (char *)pkt,
@@ -2929,14 +2929,14 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) remseg -= cnt;dprintk (5 ,"qla1280_64bit_start_scsi: " "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));qla1280_dump_buffer (5 , (char *)pkt,REQUEST_ENTRY_SIZE ); } }else {/* No data transfer */ 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));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 " "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));if (sense_sz) qla1280_dump_buffer(2,
@@ -3955,7 +3955,7 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd) sp =scsi_cmd_priv (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),CMD_CDBLEN (cmd));printk (" CDB = " );
@@ -3976,29 +3976,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
Signature · 1 line
2.49.0
Martin K. Petersen
AppliedMagnus,
Quoted 4 lines
Building the qla1280 driver with
DEBUG_QLA1280set will emit compiler warnings. Fix some print formatting strings to reflect the correct type of printed variables as well as remove unused code. (static functionql1280_dump_device) in order to avoid compiler warnings.
Applied to 6.19/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen