[PATCH -next] bcachefs: Remove the unused variable block_size

From: Jiapeng Chong
Date: Mon Feb 24 2025 - 01:35:28 EST


Variable block_size is not effectively used, so delete it.

fs/bcachefs/super-io.c:369:6: warning: variable ‘block_size’ set but not used.

Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=19045
Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
---
fs/bcachefs/super-io.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c
index 0edc8814eb7e..ab99a2fb9356 100644
--- a/fs/bcachefs/super-io.c
+++ b/fs/bcachefs/super-io.c
@@ -366,7 +366,6 @@ static int bch2_sb_validate(struct bch_sb_handle *disk_sb,
struct bch_sb *sb = disk_sb->sb;
struct bch_sb_field_members_v1 *mi;
enum bch_opt_id opt_id;
- u16 block_size;
int ret;

ret = bch2_sb_compatible(sb, out);
@@ -385,8 +384,6 @@ static int bch2_sb_validate(struct bch_sb_handle *disk_sb,
return -BCH_ERR_invalid_sb_features;
}

- block_size = le16_to_cpu(sb->block_size);
-
if (bch2_is_zero(sb->user_uuid.b, sizeof(sb->user_uuid))) {
prt_printf(out, "Bad user UUID (got zeroes)");
return -BCH_ERR_invalid_sb_uuid;
--
2.32.0.3.g01195cf9f