From: Colin Ian King <colin.i.king@gmail.com>
To: Jan Kara <jack@suse.com>, linux-kernel@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, llvm@lists.linux.dev
Subject: [PATCH] udf: remove redundant assignment of variable etype
Date: Mon, 7 Mar 2022 15:21:49 +0000 [thread overview]
Message-ID: <20220307152149.139045-1-colin.i.king@gmail.com> (raw)
Variable etype is being assigned a value that is never read. The
variable and assignment are redundant and can be removed.
Cleans up clang scan build warning:
fs/udf/super.c:2485:10: warning: Although the value stored to 'etype'
is used in the enclosing expression, the value is never actually read
from 'etype' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/udf/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 48871615e489..4042d9739fb7 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -2474,7 +2474,6 @@ static unsigned int udf_count_free_table(struct super_block *sb,
unsigned int accum = 0;
uint32_t elen;
struct kernel_lb_addr eloc;
- int8_t etype;
struct extent_position epos;
mutex_lock(&UDF_SB(sb)->s_alloc_mutex);
@@ -2482,7 +2481,7 @@ static unsigned int udf_count_free_table(struct super_block *sb,
epos.offset = sizeof(struct unallocSpaceEntry);
epos.bh = NULL;
- while ((etype = udf_next_aext(table, &epos, &eloc, &elen, 1)) != -1)
+ while (udf_next_aext(table, &epos, &eloc, &elen, 1) != -1)
accum += (elen >> table->i_sb->s_blocksize_bits);
brelse(epos.bh);
--
2.35.1
next reply other threads:[~2022-03-07 15:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 15:21 Colin Ian King [this message]
2022-03-08 8:02 ` [PATCH] udf: remove redundant assignment of variable etype Jan Kara
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=20220307152149.139045-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=jack@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
/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