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

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

index c76e9f05d042394b880b310e241493d9745dec3e..09958f78b70f99a4ed499ced7f8a0e4536f8cac2 100644 (file)
@@ -4164,8 +4164,8 @@ static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd)
        **
        **----------------------------------------------------
        */
-       if (np->settle_time && cmd->request->timeout >= HZ) {
-               u_long tlimit = jiffies + cmd->request->timeout - HZ;
+       if (np->settle_time && scsi_cmd_to_rq(cmd)->timeout >= HZ) {
+               u_long tlimit = jiffies + scsi_cmd_to_rq(cmd)->timeout - HZ;
                if (time_after(np->settle_time, tlimit))
                        np->settle_time = tlimit;
        }