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

Cleans up clang-scan build warning:
fs/bcachefs/buckets.c:1303:25: warning: Value stored to 'd' 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/btree_update_interior.c
fs/bcachefs/buckets.c

index c5b571f8333c3982ce55a3229f597ac2eedf8b8a..c8d0942650f13150acc491f4d0cbffb097c2f224 100644 (file)
@@ -143,7 +143,7 @@ static size_t btree_node_u64s_with_format(struct btree *b,
 }
 
 /**
- * btree_node_format_fits - check if we could rewrite node with a new format
+ * bch2_btree_node_format_fits - check if we could rewrite node with a new format
  *
  * This assumes all keys can pack with the new format -- it just checks if
  * the re-packed keys would fit inside the node itself.
index 77ded7c5a22cb33d82c9a2a1d1d9e29700eec9dc..78139f73636c46571aa552c1c40f435def740c68 100644 (file)
@@ -1300,7 +1300,7 @@ int bch2_trans_fs_usage_apply(struct btree_trans *trans,
        static int warned_disk_usage = 0;
        bool warn = false;
        unsigned disk_res_sectors = trans->disk_res ? trans->disk_res->sectors : 0;
-       struct replicas_delta *d = deltas->d, *d2;
+       struct replicas_delta *d, *d2;
        struct replicas_delta *top = (void *) deltas->d + deltas->used;
        struct bch_fs_usage *dst;
        s64 added = 0, should_not_have_added;