Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1373496pxb; Fri, 21 Jan 2022 16:53:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeDpkS2JysoRlLABUpVxH6EN9LXBh60xJMzbIMIbI1AtJNlsHEqwsSiMK68pQ8MgyiRTkB X-Received: by 2002:a17:903:2342:b0:14a:e540:6c83 with SMTP id c2-20020a170903234200b0014ae5406c83mr5575979plh.69.1642812807548; Fri, 21 Jan 2022 16:53:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642812807; cv=none; d=google.com; s=arc-20160816; b=VJ/RwqgO4ummePmmtQHTbuZrjhvDgK87q85vbHTzrgpsPfSbF+/YAofAh9VRjKcYB1 VBcE0wJhNv1Ku/Yo7P16+L5gCjH6/EJDMY0QIShuuJtzmLRHoaFdo0L7MgrT8nSkCwRd UnEQU+RKQ7vzesLrEvYjqxCIB5KOSfEig/g22YKJ+5G1Zp0Lp57c1GVVHB5UJHeqqGAM I6dfh95Z3llCsYpJ7PCqGK2iF4s/cNSyQBrFp9+PKWArShMcCZH+jLckkvHkppJXynLN WqQB6x9vFZUpjrs8wkM6Jt7QMd0vUfhbHDKscbFyqRdGNKYy1o/H0MTykK7IXsngzHWa 2KJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=A4/Z03yFlzQ8UqGrtP5BKT61uSE/lxftkjZOzeYni8U=; b=uUPG8ir3nO0WdtLbiwmvccOaD+psieE5GeRffGnVX1GHe4NwfKyqHdjEaQa/Rwj1HB ql1S6PjJ7NnHuaI8PceOZz5N0zrxiulNl188W4zc/+wDyqf8J53Ci/MiI0KedyQUdtGz sGdYD0TehhUAz8lxrGjnOCNvaLwfI/q8rNqREi8DOBeu1xg0bxuBm8bBb26nKBlKkhkw 9Mpzmnc2M4avXPAta6JvNOag8V3oU2P8kUS4Ozfp4yEX3kowcYJrCF5OE4ZfrZ1vK0Sf /nTMD2VYBxeKQy9Jdj4ZdFZnOyC39s8ttyG23bJFUqI+cfVKncPJPNjmLulARKAnXpyD LcLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id na16si16472738pjb.129.2022.01.21.16.53.16; Fri, 21 Jan 2022 16:53:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380213AbiAULmw (ORCPT + 99 others); Fri, 21 Jan 2022 06:42:52 -0500 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:17890 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350181AbiAULmo (ORCPT ); Fri, 21 Jan 2022 06:42:44 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0V2RfJw4_1642765347; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0V2RfJw4_1642765347) by smtp.aliyun-inc.com(127.0.0.1); Fri, 21 Jan 2022 19:42:32 +0800 From: Jiapeng Chong To: clm@fb.com Cc: josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] btrfs: scrub: Remove redundant initialization of increment Date: Fri, 21 Jan 2022 19:42:24 +0800 Message-Id: <20220121114224.92247-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Jiapeng Chong --- fs/btrfs/scrub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 2e9a322773f2..38f5666eff14 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -3209,7 +3209,6 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx, offset = 0; nstripes = div64_u64(dev_extent_len, map->stripe_len); mirror_num = 1; - increment = map->stripe_len; if (map->type & BTRFS_BLOCK_GROUP_RAID0) { offset = map->stripe_len * stripe_index; increment = map->stripe_len * map->num_stripes; -- 2.20.1.7.g153144c