public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>,
	linux-bcachefs@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] bcachefs: remove redundant assignment to variable ret
Date: Wed, 21 Feb 2024 08:37:05 -0500	[thread overview]
Message-ID: <ZdX8gTpgqyM/jjvp@bfoster> (raw)
In-Reply-To: <20240221115203.3413554-1-colin.i.king@gmail.com>

On Wed, Feb 21, 2024 at 11:52:03AM +0000, Colin Ian King wrote:
> Variable ret is being assigned a value that is never read, it is
> being re-assigned a couple of statements later on. The assignment
> is redundant and can be removed.
> 
> Cleans up clang scan build warning:
> fs/bcachefs/super-io.c:806:2: warning: Value stored to 'ret' is
> never read [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/bcachefs/super-io.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c
> index 110dcb0337ce..c6d590404425 100644
> --- a/fs/bcachefs/super-io.c
> +++ b/fs/bcachefs/super-io.c
> @@ -804,7 +804,6 @@ static int __bch2_read_super(const char *path, struct bch_opts *opts,
>  		goto err;
>  	}
>  
> -	ret = 0;
>  	sb->have_layout = true;
>  
>  	ret = bch2_sb_validate(sb, &err, READ);
> -- 
> 2.39.2
> 


  reply	other threads:[~2024-02-21 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 11:52 [PATCH][next] bcachefs: remove redundant assignment to variable ret Colin Ian King
2024-02-21 13:37 ` Brian Foster [this message]
2024-02-22  0:04 ` Kent Overstreet
2024-02-22  0:08   ` Colin King (gmail)
2024-02-22  0:13     ` Kent Overstreet
2024-02-22  5:24       ` Dan Carpenter
2024-02-22  6:37         ` Kent Overstreet

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=ZdX8gTpgqyM/jjvp@bfoster \
    --to=bfoster@redhat.com \
    --cc=colin.i.king@gmail.com \
    --cc=kent.overstreet@linux.dev \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-bcachefs@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