]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
scsi: sd_zbc: Remove superfluous assignments
authorBart Van Assche <bart.vanassche@sandisk.com>
Mon, 24 Apr 2017 07:51:14 +0000 (16:51 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 25 Apr 2017 17:00:57 +0000 (13:00 -0400)
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>
drivers/scsi/sd_zbc.c

index a7926825b1205a398564099550e0284e7d9b8fd2..29ba1d7e9b2e8814186dc1ff35cf17ba54dd42d4 100644 (file)
@@ -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