diff mbox series

[09/39] scsi: do not use DRIVER_INVALID

Message ID 20210423113944.42672-10-hare@suse.de
State Superseded
Headers show
Series SCSI result cleanup, part 2 | expand

Commit Message

Hannes Reinecke April 23, 2021, 11:39 a.m. UTC
There is no point in returning DID_ABORT together with DRIVER_INVALID,
as the caller couldn't care less where the abort originated.
So drop the use of DRIVER_INVALID.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/hptiop.c     | 2 +-
 drivers/scsi/mvumi.c      | 4 ++--
 drivers/scsi/vmw_pvscsi.c | 3 ---
 3 files changed, 3 insertions(+), 6 deletions(-)

Comments

Bart Van Assche April 26, 2021, 3:42 a.m. UTC | #1
On 4/23/21 4:39 AM, Hannes Reinecke wrote:
> There is no point in returning DID_ABORT together with DRIVER_INVALID,

> as the caller couldn't care less where the abort originated.

> So drop the use of DRIVER_INVALID.


Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Christoph Hellwig April 26, 2021, 3:20 p.m. UTC | #2
Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index db4c7a7ff4dd..61cda7b7624f 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -760,7 +760,7 @@  static void hptiop_finish_scsi_req(struct hptiop_hba *hba, u32 tag,
 		goto skip_resid;
 
 	default:
-		scp->result = DRIVER_INVALID << 24 | DID_ABORT << 16;
+		scp->result = DID_ABORT << 16;
 		break;
 	}
 
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index f61250545025..6bb03d7a254d 100644
--- a/drivers/scsi/mvumi.c
+++ b/drivers/scsi/mvumi.c
@@ -1320,7 +1320,7 @@  static void mvumi_complete_cmd(struct mvumi_hba *mhba, struct mvumi_cmd *cmd,
 		}
 		break;
 	default:
-		scmd->result |= (DRIVER_INVALID << 24) | (DID_ABORT << 16);
+		scmd->result |= (DID_ABORT << 16);
 		break;
 	}
 
@@ -2127,7 +2127,7 @@  static enum blk_eh_timer_return mvumi_timed_out(struct scsi_cmnd *scmd)
 	else
 		atomic_dec(&mhba->fw_outstanding);
 
-	scmd->result = (DRIVER_INVALID << 24) | (DID_ABORT << 16);
+	scmd->result = (DID_ABORT << 16);
 	scmd->SCp.ptr = NULL;
 	if (scsi_bufflen(scmd)) {
 		dma_unmap_sg(&mhba->pdev->dev, scsi_sglist(scmd),
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index f0707eaad9f7..f57f8bc037d2 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -601,9 +601,6 @@  static void pvscsi_complete_request(struct pvscsi_adapter *adapter,
 		case BTSTAT_LUNMISMATCH:
 		case BTSTAT_TAGREJECT:
 		case BTSTAT_BADMSG:
-			cmd->result = (DRIVER_INVALID << 24);
-			fallthrough;
-
 		case BTSTAT_HAHARDWARE:
 		case BTSTAT_INVPHASE:
 		case BTSTAT_HATIMEOUT: