Skip to content

Commit

Permalink
scsi: sd: Remove a local variable
Browse files Browse the repository at this point in the history
This patch does not change any functionality.

Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
[ bvanassche: extracted this patch from a larger patch ]
Signed-off-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
bvanassche authored and martinkpetersen committed Jan 23, 2019
1 parent 326a859 commit 84f7a9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 84f7a9d

Please sign in to comment.