mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Jan Kara <jack@suse.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	llvm@lists.linux.dev
Subject: Re: [PATCH] udf: remove redundant assignment of variable etype
Date: Tue, 8 Mar 2022 09:02:06 +0100	[thread overview]
Message-ID: <20220308080206.bumkpk2orl7m3cpt@quack3.lan> (raw)
In-Reply-To: <20220307152149.139045-1-colin.i.king@gmail.com>

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

      reply	other threads:[~2022-03-08  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 15:21 Colin Ian King
2022-03-08  8:02 ` Jan Kara [this message]

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=20220308080206.bumkpk2orl7m3cpt@quack3.lan \
    --to=jack@suse.cz \
    --cc=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

all inboxes | Powered by JetHome®