Skip to content

Commit

Permalink
scsi: qedi: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bvanassche authored and martinkpetersen committed Aug 12, 2021
1 parent d995da6 commit 44656cf
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/scsi/qedi/qedi_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 44656cf

Please sign in to comment.