* [PATCH] udf: remove redundant assignment of variable etype
@ 2022-03-07 15:21 Colin Ian King
2022-03-08 8:02 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-03-07 15:21 UTC (permalink / raw)
To: Jan Kara, linux-kernel; +Cc: kernel-janitors, llvm
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] udf: remove redundant assignment of variable etype
2022-03-07 15:21 [PATCH] udf: remove redundant assignment of variable etype Colin Ian King
@ 2022-03-08 8:02 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2022-03-08 8:02 UTC (permalink / raw)
To: Colin Ian King; +Cc: Jan Kara, linux-kernel, kernel-janitors, llvm
On Mon 07-03-22 15:21:49, Colin Ian King wrote:
> 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>
Thanks! I've added the patch to my tree.
Honza
> ---
> 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
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-08 8:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 15:21 [PATCH] udf: remove redundant assignment of variable etype Colin Ian King
2022-03-08 8:02 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox