summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-01-16 01:49:57 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-01-23 03:18:27 +0100
commit84f7a9de0602704bbec774a6c7f7c8c4994bee9c (patch)
treef43c6ac5aec87f03d602c21af7e20e9a43808451 /drivers/scsi/sd.c
parentscsi: ufs: Remove select of phy-qcom-ufs from ufs-qcom (diff)
downloadlinux-84f7a9de0602704bbec774a6c7f7c8c4994bee9c.tar.xz
linux-84f7a9de0602704bbec774a6c7f7c8c4994bee9c.zip
scsi: sd: Remove a local variable
This patch does not change any functionality. Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> [ bvanassche: extracted this patch from a larger patch ] Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index c6ca3d915925..a60b98681f15 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1015,7 +1015,6 @@ static blk_status_t sd_setup_write_same_cmnd(struct scsi_cmnd *cmd)
struct bio *bio = rq->bio;
sector_t sector = blk_rq_pos(rq);
unsigned int nr_sectors = blk_rq_sectors(rq);
- unsigned int nr_bytes = blk_rq_bytes(rq);
blk_status_t ret;
if (sdkp->device->no_write_same)
@@ -1055,7 +1054,7 @@ static blk_status_t sd_setup_write_same_cmnd(struct scsi_cmnd *cmd)
*/
rq->__data_len = sdp->sector_size;
ret = scsi_init_io(cmd);
- rq->__data_len = nr_bytes;
+ rq->__data_len = blk_rq_bytes(rq);
return ret;
}