summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd_zbc.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2017-04-24 09:51:14 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-04-25 19:00:57 +0200
commitf70532406aa4193e484b1e3c4d7d613f39257a44 (patch)
treea2984f330fe4e577e592a3f4443b6c6de12ad50c /drivers/scsi/sd_zbc.c
parentscsi: sd: sd_zbc: Rename sd_zbc_setup_write_cmnd (diff)
downloadlinux-f70532406aa4193e484b1e3c4d7d613f39257a44.tar.xz
linux-f70532406aa4193e484b1e3c4d7d613f39257a44.zip
scsi: sd_zbc: Remove superfluous assignments
A value is assigned to the variable 'capacity' in sd_zbc_read_zones() but that value is never used. Hence remove the variable 'capacity'. [Damien: There is no need to initialize to 0 the variable 'ret' in sd_zbc_read_zones()] Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sd_zbc.c')
-rw-r--r--drivers/scsi/sd_zbc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index a7926825b120..29ba1d7e9b2e 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -560,8 +560,7 @@ static int sd_zbc_setup(struct scsi_disk *sdkp)
int sd_zbc_read_zones(struct scsi_disk *sdkp,
unsigned char *buf)
{
- sector_t capacity;
- int ret = 0;
+ int ret;
if (!sd_is_zoned(sdkp))
/*
@@ -593,7 +592,6 @@ int sd_zbc_read_zones(struct scsi_disk *sdkp,
ret = sd_zbc_check_capacity(sdkp, buf);
if (ret)
goto err;
- capacity = logical_to_sectors(sdkp->device, sdkp->capacity);
/*
* Check zone size: only devices with a constant zone size (except