lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191115131829.162946-1-yuehaibing@huawei.com>
Date:   Fri, 15 Nov 2019 13:18:29 +0000
From:   YueHaibing <yuehaibing@...wei.com>
To:     "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        Damien Le Moal <damien.lemoal@....com>,
        Jens Axboe <axboe@...nel.dk>,
        "Martin K. Petersen" <martin.petersen@...cle.com>
CC:     YueHaibing <yuehaibing@...wei.com>, <linux-scsi@...r.kernel.org>,
        <linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <kernel-janitors@...r.kernel.org>, Hulk Robot <hulkci@...wei.com>
Subject: [PATCH -next] 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 d9dd73087a8b ("block: Enhance
blk_revalidate_disk_zones()")

Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
 drivers/scsi/sd_zbc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 23281825ec38..0e5ede48f045 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -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)) {



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ