scsi: qedi: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
authorBart Van Assche <bvanassche@acm.org>
Mon, 9 Aug 2021 23:03:39 +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-37-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedi/qedi_fw.c

index 71333d3c5c86eb001d89e9ca4f6c6e84ba3a4e41..ac99e980bb3191198407e7540ad362a3dfb23a0f 100644 (file)
@@ -609,14 +609,7 @@ static void qedi_scsi_completion(struct qedi_ctx *qedi,
                goto error;
        }
 
-       if (!sc_cmd->request) {
-               QEDI_WARN(&qedi->dbg_ctx,
-                         "sc_cmd->request is NULL, sc_cmd=%p.\n",
-                         sc_cmd);
-               goto error;
-       }
-
-       if (!sc_cmd->request->q) {
+       if (!scsi_cmd_to_rq(sc_cmd)->q) {
                QEDI_WARN(&qedi->dbg_ctx,
                          "request->q is NULL so request is not valid, sc_cmd=%p.\n",
                          sc_cmd);