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: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] f2fs: remove redundant assignment to variable err
Date: Wed, 19 Mar 2025 15:31:02 +0300	[thread overview]
Message-ID: <a9c06462-5fd2-4724-9d44-0285f281ecec@stanley.mountain> (raw)
In-Reply-To: <20250319113011.791319-1-colin.i.king@gmail.com>

On Wed, Mar 19, 2025 at 11:30:10AM +0000, Colin Ian King wrote:
> The variable err is being assigned a value zero and then the following
> goto page_hit reassigns err a new value. The zero assignment is redundant
> and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  fs/f2fs/node.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> index 5f15c224bf78..37c76bb19a8c 100644
> --- a/fs/f2fs/node.c
> +++ b/fs/f2fs/node.c
> @@ -1497,7 +1497,6 @@ static struct folio *__get_node_folio(struct f2fs_sb_info *sbi, pgoff_t nid,
>  	if (err < 0) {
>  		goto out_put_err;
>  	} else if (err == LOCKED_PAGE) {
> -		err = 0;
>  		goto page_hit;
>  	}

We could remove the curly braces as well.

regards,
dan carpenter


  parent reply	other threads:[~2025-03-19 12:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 11:30 Colin Ian King
2025-03-19 12:09 ` Chao Yu
2025-03-19 12:31 ` Dan Carpenter [this message]
2025-03-20  2:26   ` Jaegeuk Kim
  -- strict thread matches above, loose matches on Subject: below --
2023-06-16 14:20 Colin Ian King

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=a9c06462-5fd2-4724-9d44-0285f281ecec@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=chao@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=jaegeuk@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --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®