From: Colin Ian King <colin.i.king@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] sysv: Remove variable res
Date: Fri, 21 Oct 2022 19:14:23 +0100 [thread overview]
Message-ID: <20221021181423.29433-1-colin.i.king@gmail.com> (raw)
The variable res being incremented but it is never referenced,
it is redundant and can be removed.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/sysv/itree.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/sysv/itree.c b/fs/sysv/itree.c
index d4ec9bb97de9..505f4cb7be79 100644
--- a/fs/sysv/itree.c
+++ b/fs/sysv/itree.c
@@ -430,12 +430,10 @@ static unsigned sysv_nblocks(struct super_block *s, loff_t size)
{
struct sysv_sb_info *sbi = SYSV_SB(s);
int ptrs_bits = sbi->s_ind_per_block_bits;
- unsigned blocks, res, direct = DIRECT, i = DEPTH;
+ unsigned blocks, direct = DIRECT, i = DEPTH;
blocks = (size + s->s_blocksize - 1) >> s->s_blocksize_bits;
- res = blocks;
while (--i && blocks > direct) {
blocks = ((blocks - direct - 1) >> ptrs_bits) + 1;
- res += blocks;
direct = 1;
}
return blocks;
--
2.37.3
reply other threads:[~2022-10-21 18:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221021181423.29433-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=hch@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®