Skip to content

Commit 8c31a3d

Browse files
lorddoskiaskdave
authored andcommitted
btrfs: zoned: remove unused variable in btrfs_sb_log_location_bdev
This fixes warning: fs/btrfs/zoned.c:491:6: warning: variable ‘zone_size’ set but not used [-Wunused-but-set-variable] 491 | u64 zone_size; which got introduced in 1265925 ("btrfs: implement log-structured superblock for ZONED mode"). We'll enable the warning by default and want clean build until the relevant zoned patches land. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 3bed2da commit 8c31a3d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/btrfs/zoned.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,6 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw,
488488
unsigned int zone_sectors;
489489
u32 sb_zone;
490490
int ret;
491-
u64 zone_size;
492491
u8 zone_sectors_shift;
493492
sector_t nr_sectors;
494493
u32 nr_zones;
@@ -503,7 +502,6 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw,
503502
zone_sectors = bdev_zone_sectors(bdev);
504503
if (!is_power_of_2(zone_sectors))
505504
return -EINVAL;
506-
zone_size = zone_sectors << SECTOR_SHIFT;
507505
zone_sectors_shift = ilog2(zone_sectors);
508506
nr_sectors = bdev_nr_sectors(bdev);
509507
nr_zones = nr_sectors >> zone_sectors_shift;

0 commit comments

Comments
 (0)