diff options
author | Christoph Hellwig <hch@lst.de> | 2022-02-24 18:55:50 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-03-01 22:21:50 -0500 |
commit | dbb4c84d87af7416bb7e35f8e6dd8d87d5f221d4 (patch) | |
tree | 631497936089e518bac20582f2b7803a88d478ef /drivers/target | |
parent | a9a4ea1166d640d1b397f24afc1cd7e96c46cd03 (diff) | |
download | linux-dbb4c84d87af7416bb7e35f8e6dd8d87d5f221d4.tar.bz2 |
scsi: core: Move the result field from struct scsi_request to struct scsi_cmnd
Prepare for removing the scsi_request structure by moving the result field
to struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220224175552.988286-7-hch@lst.de
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_pscsi.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index d5828da3d392..5b23a0ff905e 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -1032,25 +1032,24 @@ static void pscsi_req_done(struct request *req, blk_status_t status) { struct se_cmd *cmd = req->end_io_data; struct scsi_cmnd *scmd = blk_mq_rq_to_pdu(req); - int result = scsi_req(req)->result; - enum sam_status scsi_status = result & 0xff; + enum sam_status scsi_status = scmd->result & 0xff; u8 *cdb = cmd->priv; if (scsi_status != SAM_STAT_GOOD) { pr_debug("PSCSI Status Byte exception at cmd: %p CDB:" - " 0x%02x Result: 0x%08x\n", cmd, cdb[0], result); + " 0x%02x Result: 0x%08x\n", cmd, cdb[0], scmd->result); } pscsi_complete_cmd(cmd, scsi_status, scmd->sense_buffer); - switch (host_byte(result)) { + switch (host_byte(scmd->result)) { case DID_OK: target_complete_cmd_with_length(cmd, scsi_status, cmd->data_length - scmd->resid_len); break; default: pr_debug("PSCSI Host Byte exception at cmd: %p CDB:" - " 0x%02x Result: 0x%08x\n", cmd, cdb[0], result); + " 0x%02x Result: 0x%08x\n", cmd, cdb[0], scmd->result); target_complete_cmd(cmd, SAM_STAT_CHECK_CONDITION); break; } |