summaryrefslogtreecommitdiff
path: root/drivers/scsi/sg.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-02-24 20:55:50 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-03-02 06:21:50 +0300
commitdbb4c84d87af7416bb7e35f8e6dd8d87d5f221d4 (patch)
tree631497936089e518bac20582f2b7803a88d478ef /drivers/scsi/sg.c
parenta9a4ea1166d640d1b397f24afc1cd7e96c46cd03 (diff)
downloadlinux-dbb4c84d87af7416bb7e35f8e6dd8d87d5f221d4.tar.xz
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/scsi/sg.c')
-rw-r--r--drivers/scsi/sg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 3eaabfb315e0..26a753521cb2 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1325,7 +1325,6 @@ sg_rq_end_io(struct request *rq, blk_status_t status)
{
struct scsi_cmnd *scmd = blk_mq_rq_to_pdu(rq);
struct sg_request *srp = rq->end_io_data;
- struct scsi_request *req = scsi_req(rq);
Sg_device *sdp;
Sg_fd *sfp;
unsigned long iflags;
@@ -1345,7 +1344,7 @@ sg_rq_end_io(struct request *rq, blk_status_t status)
pr_info("%s: device detaching\n", __func__);
sense = scmd->sense_buffer;
- result = req->result;
+ result = scmd->result;
resid = scmd->resid_len;
SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sdp,