Commit a4681681 authored by YueHaibing's avatar YueHaibing Committed by Jens Axboe
Browse files

scsi: sd_zbc: Remove set but not used variable 'buflen'



Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/sd_zbc.c: In function 'sd_zbc_check_zones':
drivers/scsi/sd_zbc.c:341:9: warning:
 variable 'buflen' set but not used [-Wunused-but-set-variable]

It is not used since commit d9dd7308 ("block: Enhance
blk_revalidate_disk_zones()")

Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d4100351
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -338,7 +338,6 @@ static int sd_zbc_check_zoned_characteristics(struct scsi_disk *sdkp,
static int sd_zbc_check_zones(struct scsi_disk *sdkp, unsigned char *buf,
			      u32 *zblocks)
{
	size_t buflen;
	u64 zone_blocks = 0;
	sector_t max_lba;
	unsigned char *rec;
@@ -363,7 +362,6 @@ static int sd_zbc_check_zones(struct scsi_disk *sdkp, unsigned char *buf,
	}

	/* Parse REPORT ZONES header */
	buflen = min_t(size_t, get_unaligned_be32(&buf[0]) + 64, SD_BUF_SIZE);
	rec = buf + 64;
	zone_blocks = get_unaligned_be64(&rec[8]);
	if (!zone_blocks || !is_power_of_2(zone_blocks)) {