[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220520040518.73957-1-jiapeng.chong@linux.alibaba.com>
Date: Fri, 20 May 2022 12:05:18 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: djwong@...nel.org
Cc: linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] xfs: Remove the redundant assignment
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 <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
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
Powered by blists - more mailing lists