bcachefs: remove redundant initialization of pointer dst
authorColin Ian King <colin.i.king@gmail.com>
Tue, 12 Sep 2023 12:37:41 +0000 (13:37 +0100)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:13 +0000 (17:10 -0400)
The pointer dst is being initialized with a value that is never read,
it is being re-assigned later on when it is used in a while-loop
The initialization is redundant and can be removed.

Cleans up clang-scan build warning:
fs/bcachefs/disk_groups.c:186:30: warning: Value stored to 'dst' during
its initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/disk_groups.c

index f36472c4a78187ae6afe61a1f30114d2b32c2b2a..9fa8d7d49f3ebe173c16ccb7a99db8c54457009f 100644 (file)
@@ -183,8 +183,7 @@ int bch2_sb_disk_groups_to_cpu(struct bch_fs *c)
 
        for (i = 0; i < c->disk_sb.sb->nr_devices; i++) {
                struct bch_member *m = mi->members + i;
-               struct bch_disk_group_cpu *dst =
-                       &cpu_g->entries[BCH_MEMBER_GROUP(m)];
+               struct bch_disk_group_cpu *dst;
 
                if (!bch2_member_exists(m))
                        continue;