]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: scrub: remove redundant initialization of increment
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 21 Jan 2022 11:42:24 +0000 (19:42 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:47 +0000 (13:13 +0100)
increment is being initialized to map->stripe_len but this is never
read as increment is overwritten later on. Remove the redundant
initialization.

Cleans up the following clang-analyzer warning:

fs/btrfs/scrub.c:3193:6: warning: Value stored to 'increment' during its
initialization is never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c

index 2e9a322773f287f2444e657799900c16ea92479b..11089568b2879e65f37de80db06c0278c0b3e1d7 100644 (file)
@@ -3190,7 +3190,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
        u64 generation;
        int mirror_num;
        struct btrfs_key key;
-       u64 increment = map->stripe_len;
+       u64 increment;
        u64 offset;
        u64 extent_logical;
        u64 extent_physical;