From: Zhihao Cheng <chengzhihao1@huawei.com>
To: Kunwu Chan <chentao@kylinos.cn>, <richard@nod.at>,
<Artem.Bityutskiy@nokia.com>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
Kunwu Chan <kunwu.chan@hotmail.com>,
Richard Weinberger <richard.weinberger@gmail.com>
Subject: Re: [PATCH v2] ubifs: Remove unreachable code in dbg_check_ltab_lnum
Date: Thu, 11 Jan 2024 20:30:14 +0800 [thread overview]
Message-ID: <920ffa51-15af-c07f-3eae-1e1ebd5fdd33@huawei.com> (raw)
In-Reply-To: <20240111063656.68810-1-chentao@kylinos.cn>
在 2024/1/11 14:36, Kunwu Chan 写道:
> Because there is no break statement in the dead loop above,it is
> impossible to execute the 'err=0' statement.Delete the code that
> will never execute.
>
> Fixes: 6fb324a4b0c3 ("UBIFS: allocate ltab checking buffer on demand")
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
> Cc: Kunwu Chan <kunwu.chan@hotmail.com>
> Suggested-by: Richard Weinberger <richard.weinberger@gmail.com>
>
> ---
> v2: Remove the initialization of err
> ---
> fs/ubifs/lpt_commit.c | 1 -
> 1 file changed, 1 deletion(-)
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
>
> diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
> index c4d079328b92..07351fdce722 100644
> --- a/fs/ubifs/lpt_commit.c
> +++ b/fs/ubifs/lpt_commit.c
> @@ -1646,7 +1646,6 @@ static int dbg_check_ltab_lnum(struct ubifs_info *c, int lnum)
> len -= node_len;
> }
>
> - err = 0;
> out:
> vfree(buf);
> return err;
>
prev parent reply other threads:[~2024-01-11 12:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 6:36 [PATCH v2] ubifs: Remove unreachable code in dbg_check_ltab_lnum Kunwu Chan
2024-01-11 12:30 ` Zhihao Cheng [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=920ffa51-15af-c07f-3eae-1e1ebd5fdd33@huawei.com \
--to=chengzhihao1@huawei.com \
--cc=Artem.Bityutskiy@nokia.com \
--cc=chentao@kylinos.cn \
--cc=kunwu.chan@hotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard.weinberger@gmail.com \
--cc=richard@nod.at \
/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;
as well as URLs for NNTP newsgroup(s).