]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: qla1280: Fix compiler warnings (DEBUG mode)
authorMagnus Lindholm <linmag7@gmail.com>
Thu, 2 Oct 2025 05:25:24 +0000 (07:25 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Oct 2025 02:06:22 +0000 (22:06 -0400)
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>
drivers/scsi/qla1280.c

index ef841f64317167971248da9a4a6319d7ce40e723..26c312a48a19869debfbf63ef094818aad710584 100644 (file)
@@ -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 %\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 %\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 %\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