From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: djwong@kernel.org
Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH] xfs: Remove the redundant assignment
Date: Fri, 20 May 2022 12:05:18 +0800 [thread overview]
Message-ID: <20220520040518.73957-1-jiapeng.chong@linux.alibaba.com> (raw)
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@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.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
next reply other threads:[~2022-05-20 4:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 4:05 Jiapeng Chong [this message]
2022-05-20 4:37 ` [PATCH] xfs: Remove the redundant assignment Dave Chinner
2022-05-20 13:08 ` kernel test robot
2022-05-22 7:25 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-05-22 0:17 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220520040518.73957-1-jiapeng.chong@linux.alibaba.com \
--to=jiapeng.chong@linux.alibaba.com \
--cc=abaci@linux.alibaba.com \
--cc=djwong@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.