From: Nick Desaulniers <ndesaulniers@google.com>
To: cgel.zte@gmail.com
Cc: viro@zeniv.linux.org.uk, nathan@kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Lv Ruyi <lv.ruyi@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] fs/buffer.c: remove unneeded code
Date: Mon, 4 Apr 2022 10:16:44 -0700 [thread overview]
Message-ID: <CAKwvOdk=_a98oaJxmYJsk_sjeBg1yELmpFeOKe1Cbox2vnVi4Q@mail.gmail.com> (raw)
In-Reply-To: <20220402084746.2413549-1-lv.ruyi@zte.com.cn>
On Sat, Apr 2, 2022 at 1:47 AM <cgel.zte@gmail.com> wrote:
>
> From: Lv Ruyi <lv.ruyi@zte.com.cn>
>
> fix clang warning: Value stored to 'err' is never read in line 2944.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
The change LGTM, but next time please consider putting the exact text
of the warning observed in the commit message. For instance, it's not
clear to me whether this was a compiler warning via -W flag, or a
DeadStore warning from clang-tidy.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> fs/buffer.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/buffer.c b/fs/buffer.c
> index bfc566de36e5..b2045871e81c 100644
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -2941,7 +2941,6 @@ int block_truncate_page(struct address_space *mapping,
> pos += blocksize;
> }
>
> - err = 0;
> if (!buffer_mapped(bh)) {
> WARN_ON(bh->b_size != blocksize);
> err = get_block(inode, iblock, bh, 0);
> --
> 2.25.1
>
--
Thanks,
~Nick Desaulniers
prev parent reply other threads:[~2022-04-04 21:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-02 8:47 [PATCH] fs/buffer.c: remove unneeded code cgel.zte
2022-04-02 21:41 ` Chaitanya Kulkarni
2022-04-04 17:16 ` Nick Desaulniers [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='CAKwvOdk=_a98oaJxmYJsk_sjeBg1yELmpFeOKe1Cbox2vnVi4Q@mail.gmail.com' \
--to=ndesaulniers@google.com \
--cc=cgel.zte@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lv.ruyi@zte.com.cn \
--cc=nathan@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=zealci@zte.com.cn \
/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).