[088/117] qlogicpti: Convert to the scsi_status union

Message ID 20210420000845.25873-89-bvanassche@acm.org
State New
Headers show
Series
  • Make better use of static type checking
Related show

Commit Message

Bart Van Assche April 20, 2021, 12:08 a.m.
An explanation of the purpose of this patch is available in the patch
"scsi: Introduce the scsi_status union".

Cc: GR-QLogic-Storage-Upstream@marvell.com
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/qlogicpti.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index d84e218d32cb..31d070a7f138 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1057,7 +1057,7 @@  static int qlogicpti_queuecommand_lck(struct scsi_cmnd *Cmnd, void (*done)(struc
 	 * we don't, the midlayer will ignore the return value,
 	 * which is insane.  We pick up the pieces like this.
 	 */
-	Cmnd->result = DID_BUS_BUSY;
+	Cmnd->status.combined = DID_BUS_BUSY;
 	done(Cmnd);
 	return 1;
 }
@@ -1180,10 +1180,10 @@  static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
 			       SCSI_SENSE_BUFFERSIZE);
 
 		if (sts->hdr.entry_type == ENTRY_STATUS)
-			Cmnd->result =
+			Cmnd->status.combined =
 			    qlogicpti_return_status(sts, qpti->qpti_id);
 		else
-			Cmnd->result = DID_ERROR << 16;
+			Cmnd->status.combined = DID_ERROR << 16;
 
 		if (scsi_bufflen(Cmnd))
 			dma_unmap_sg(&qpti->op->dev,