Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2094222iob; Fri, 20 May 2022 01:39:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGFNpwCUYc05uRJ1Edf5wZhJh/ICY799w9lX3ys4vewBPkcK+cgoSdzby1LtSbBlBGQUTG X-Received: by 2002:a17:906:c1ca:b0:6fe:9c2a:8106 with SMTP id bw10-20020a170906c1ca00b006fe9c2a8106mr5799094ejb.383.1653035978512; Fri, 20 May 2022 01:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653035978; cv=none; d=google.com; s=arc-20160816; b=I874qCOliiWne8O1ytgN7ET12qY3qXYxo3TgfifBm1uK7zN8fdo0FDHbdYnebKkn1W wUtRuf/4MBz0GUzEn3p5OTo6Jj5r8+FIZRsYTXuMuwvqzgg2/wjISan1bff8Y/Jt1vTI 6/sH6m5S+esE+fvrFjeik7TBhmJu3VVwzxeG6b9cj95C7ZtB1Ji7722NDbS585Sf+iz0 U6KGyQknlCATSEv2aeOWqYTWvNBy/gcgxB91U5B/ZThvG+Vn0R16DB0ELDtkP+zRud1h srm0QIMGsQpY46Pp4U/JZaaPtuWGRjLP5NBBST9PdwJe8vVT6Sul24X/VbPMhNVjLfVS yNWQ== 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=NWAUJ8/3vSKS4hKfqK7GCrlarQ7vA5AVSGU7b9cIGaw=; b=cd0r8ofsBsqprF+mE8subOTMUFZ2mWDZj7Z1SxGtS/b4/i+y2gxkV7pbPr3R9uFtQg RPnlHpFgDXUY7VmCUfo9Z8df8AJLWGL3EUQV4wossHqGxAyBozN1UYk93Nu8c2BxMDRK 740amuZjYlV13ABQf56zNbIEULpd25sOqFP1m4shsLw6HZYiU94JTeP6bHMhWz8ShEFd gzBQR/r8JE8RPYadYWLAJiR3v21By3duJMSUv39kUGK0C6Q/E5omXNGtDtt91eQp7mSO q3UoYJGCHr65ciN9PUH6eqmg3mbuPfvt1+wL1OFr/VIm9Er6ErA2/i0YBVpE4ayVKYmf 1qfw== 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 i7-20020a05640242c700b0042ae84b2966si8206750edc.410.2022.05.20.01.39.13; Fri, 20 May 2022 01:39:38 -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 S230143AbiETEFi (ORCPT + 99 others); Fri, 20 May 2022 00:05:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbiETEFd (ORCPT ); Fri, 20 May 2022 00:05:33 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A2DE14A270; Thu, 19 May 2022 21:05:32 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VDoVbWo_1653019520; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VDoVbWo_1653019520) by smtp.aliyun-inc.com(127.0.0.1); Fri, 20 May 2022 12:05:29 +0800 From: Jiapeng Chong To: djwong@kernel.org Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] xfs: Remove the redundant assignment Date: Fri, 20 May 2022 12:05:18 +0800 Message-Id: <20220520040518.73957-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,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 Variable 'ifree','freeblks' and 'itotal' set but not used. Eliminate the follow clang warning: fs/xfs/xfs_log_recover.c:3534:12: warning: variable 'freeblks' set but not used [-Wunused-but-set-variable]. fs/xfs/xfs_log_recover.c:3535:12: warning: variable 'itotal' set but not used [-Wunused-but-set-variable]. fs/xfs/xfs_log_recover.c:3536:12: warning: variable 'ifree' set but not used [-Wunused-but-set-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- fs/xfs/xfs_log_recover.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 97b941c07957..47736936ebba 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -3531,14 +3531,8 @@ xlog_recover_check_summary( struct xfs_buf *agfbp; struct xfs_buf *agibp; xfs_agnumber_t agno; - uint64_t freeblks; - uint64_t itotal; - uint64_t ifree; int error; - freeblks = 0LL; - itotal = 0LL; - ifree = 0LL; for_each_perag(mp, agno, pag) { error = xfs_read_agf(mp, NULL, pag->pag_agno, 0, &agfbp); if (error) { @@ -3546,9 +3540,6 @@ xlog_recover_check_summary( __func__, pag->pag_agno, error); } else { struct xfs_agf *agfp = agfbp->b_addr; - - freeblks += be32_to_cpu(agfp->agf_freeblks) + - be32_to_cpu(agfp->agf_flcount); xfs_buf_relse(agfbp); } @@ -3558,9 +3549,6 @@ xlog_recover_check_summary( __func__, pag->pag_agno, error); } else { struct xfs_agi *agi = agibp->b_addr; - - itotal += be32_to_cpu(agi->agi_count); - ifree += be32_to_cpu(agi->agi_freecount); xfs_buf_relse(agibp); } } -- 2.20.1.7.g153144c