Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12108113rwd; Fri, 23 Jun 2023 01:13:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6+l2ICIvAQx6TWXhSZpMdlPpuE5E0/RR8tlnRGy7R1nRRbbbk30F0/LmgGBKnL8s0ivHhw X-Received: by 2002:a05:6a20:a219:b0:125:2e2f:23c with SMTP id u25-20020a056a20a21900b001252e2f023cmr2572012pzk.16.1687508005696; Fri, 23 Jun 2023 01:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687508005; cv=none; d=google.com; s=arc-20160816; b=G9xZp2bEL9VhbSJgHxJ/4oxaJvGGjHfshihb25oqurLEZdYqcaWPvqgYwHRelXcnsG LCSddF155WkbX9K3H5+adUH0WyE/5A4HUeoT4VAhSJk/lKYyXICAJ6Lm9HDuoFkde6sV e0pj+Z60mxu1KNjjKbRe1jdTDEGy1nmEIMMZV+PL4d5TiNepoo9+2nXK1f/BerqHq+aA nMKt6hW8nIFrikdG8mIIT86oOb76v5Fekwe11y1vqIuSplKQ9vNA7KnoiH9IIS72GoaL nxlAbqfPRTfOU6pufWi/m+7Cmv1O9YiL1gSzzYwFOUuU0VRtjJHe5jdRAKPPrUXLT5pC LIQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=TPKaq30eN1FjGh4uETzD61j7ISYsU/HjaaxPJWq37yU=; b=IdWWmW6iMebY7EEBZ7wbM8Nm3T+LfxJMyd9WTToPE3uGa/vD9HdAQd/pRcJ6vFd/yw IRxQzE6ex6exFRcyHSlwNzWZn/0kVgKsOZpyeYsRoAT5YovWsaMNbsAv45xRbBT+pxSq fr6rY8OY/k3l3AbOysAOcPKWeSVLduFnkZxgulvPxt9x7f+/YLxf16AUFBWhUz0Hm5fg lHAXc7li3IronejPSWfkI+cfEdUSy0RSkf5rWbzLQ+0LjCFbWAdZluh9w4g+hIQUniWD nVqfyTJ2iP7csU0CB7naLMWIFw4qRnouVo8CCyq0WCrVPMAd9zceBLThY9Zx8PeZO4QB Qr7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b67-20020a633446000000b0053f29758cd1si8034262pga.839.2023.06.23.01.13.14; Fri, 23 Jun 2023 01:13:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230094AbjFWIDr (ORCPT + 99 others); Fri, 23 Jun 2023 04:03:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229999AbjFWIDp (ORCPT ); Fri, 23 Jun 2023 04:03:45 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B6931BE2; Fri, 23 Jun 2023 01:03:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VllSQm1_1687507418; Received: from 30.121.25.227(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0VllSQm1_1687507418) by smtp.aliyun-inc.com; Fri, 23 Jun 2023 16:03:39 +0800 Message-ID: <6f0dfe19-426a-19cd-05f2-7184377b4862@linux.alibaba.com> Date: Fri, 23 Jun 2023 16:03:38 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH][next] ocfs2: remove redundant assignment to variable bit_off Content-Language: en-US To: Colin Ian King , Mark Fasheh , Joel Becker , ocfs2-devel@oss.oracle.com, akpm Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230622102736.2831126-1-colin.i.king@gmail.com> From: Joseph Qi In-Reply-To: <20230622102736.2831126-1-colin.i.king@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/22/23 6:27 PM, Colin Ian King wrote: > Variable bit_off is being assigned a value that is never read, it is > being re-assigned a new value in the following while loop. Remove the > assignment. Cleans up clang scan build warning: > > fs/ocfs2/localalloc.c:976:18: warning: Although the value stored to > 'bit_off' is used in the enclosing expression, the value is never > actually read from 'bit_off' [deadcode.DeadStores] > > Signed-off-by: Colin Ian King Reviewed-by: Joseph Qi > --- > fs/ocfs2/localalloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c > index c4426d12a2ad..c803c10dd97e 100644 > --- a/fs/ocfs2/localalloc.c > +++ b/fs/ocfs2/localalloc.c > @@ -973,7 +973,7 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, > la_start_blk = ocfs2_clusters_to_blocks(osb->sb, > le32_to_cpu(la->la_bm_off)); > bitmap = la->la_bitmap; > - start = count = bit_off = 0; > + start = count = 0; > left = le32_to_cpu(alloc->id1.bitmap1.i_total); > > while ((bit_off = ocfs2_find_next_zero_bit(bitmap, left, start))