mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Jan Kara <jack@suse.com>,
	linux-ext4@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] ext2: remove redundant assignment to variable desc
Date: Fri, 30 Jun 2023 19:47:05 +0300	[thread overview]
Message-ID: <b12f7d11-4bfe-4e53-9a32-ce8db056d561@kadam.mountain> (raw)
In-Reply-To: <20230630163033.165326-1-colin.i.king@gmail.com>

On Fri, Jun 30, 2023 at 05:30:33PM +0100, Colin Ian King wrote:
> Variable desc is being assigned a value that is never read, the exit
> via label found immeditely returns with no access to desc. The
> assignment is redundant and can be removed. Cleans up clang scan
> muild warning:
> 
> fs/ext2/ialloc.c:297:4: warning: Value stored to 'desc' is never
> read [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  fs/ext2/ialloc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
> index a4e1d7a9c544..f50beb77d6ba 100644
> --- a/fs/ext2/ialloc.c
> +++ b/fs/ext2/ialloc.c
> @@ -294,7 +294,6 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
>  			best_desc = desc;
>  		}
>  		if (best_group >= 0) {
> -			desc = best_desc;

You should get rid of the "best_desc" variable as well.

regards,
dan carpenter


  reply	other threads:[~2023-06-30 16:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 16:30 Colin Ian King
2023-06-30 16:47 ` Dan Carpenter [this message]
2023-06-30 16:53   ` Colin King (gmail)
2023-06-30 19:14 ` 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=b12f7d11-4bfe-4e53-9a32-ce8db056d561@kadam.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=colin.i.king@gmail.com \
    --cc=jack@suse.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-ext4@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®