scsi: qla1280: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
authorBart Van Assche <bvanassche@acm.org>
Mon, 9 Aug 2021 23:03:40 +0000 (16:03 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 12 Aug 2021 02:25:41 +0000 (22:25 -0400)
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. Remove the unused CMD_REQUEST() macro. This patch does not change
any functionality.

Link: https://lore.kernel.org/r/20210809230355.8186-38-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla1280.c

index 928da90..9f9b490 100644 (file)
@@ -490,7 +490,6 @@ __setup("qla1280=", qla1280_setup);
 #define        CMD_SNSLEN(Cmnd)        SCSI_SENSE_BUFFERSIZE
 #define        CMD_RESULT(Cmnd)        Cmnd->result
 #define        CMD_HANDLE(Cmnd)        Cmnd->host_scribble
-#define CMD_REQUEST(Cmnd)      Cmnd->request->cmd
 
 #define CMD_HOST(Cmnd)         Cmnd->device->host
 #define SCSI_BUS_32(Cmnd)      Cmnd->device->channel
@@ -2827,7 +2826,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
        memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8));
 
        /* Set ISP command timeout. */
-       pkt->timeout = cpu_to_le16(cmd->request->timeout/HZ);
+       pkt->timeout = cpu_to_le16(scsi_cmd_to_rq(cmd)->timeout / HZ);
 
        /* Set device target ID and LUN */
        pkt->lun = SCSI_LUN_32(cmd);
@@ -3082,7 +3081,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
        memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8));
 
        /* Set ISP command timeout. */
-       pkt->timeout = cpu_to_le16(cmd->request->timeout/HZ);
+       pkt->timeout = cpu_to_le16(scsi_cmd_to_rq(cmd)->timeout / HZ);
 
        /* Set device target ID and LUN */
        pkt->lun = SCSI_LUN_32(cmd);