From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, clm@fb.com
Cc: josef@toxicpanda.com, dsterba@suse.com,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] btrfs: Remove redundant initialization of slot
Date: Fri, 31 Dec 2021 21:07:45 +0800 [thread overview]
Message-ID: <f6aa56ee-16b2-9a53-2377-07d638b1289b@gmx.com> (raw)
In-Reply-To: <20211231122306.13720-1-jiapeng.chong@linux.alibaba.com>
On 2021/12/31 20:23, Jiapeng Chong wrote:
> slot is being initialized to path->slots[0] but this is never
> read as slot is overwritten later on. Remove the redundant
> initialization.
>
> Cleans up the following clang-analyzer warning:
>
> fs/btrfs/tree-log.c:6125:7: warning: Value stored to 'slot' during its
> initialization is never read [clang-analyzer-deadcode.DeadStores].
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> fs/btrfs/tree-log.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
> index 9165486b554e..c083562a3334 100644
> --- a/fs/btrfs/tree-log.c
> +++ b/fs/btrfs/tree-log.c
> @@ -6122,7 +6122,7 @@ static int log_new_ancestors(struct btrfs_trans_handle *trans,
> while (true) {
> struct btrfs_fs_info *fs_info = root->fs_info;
> struct extent_buffer *leaf = path->nodes[0];
> - int slot = path->slots[0];
> + int slot;
If you're cleaning up slot, then why not also cleaning up leaf?
And again, no feedback no matter what on other patches from you, and
still CC to maintainers.
> struct btrfs_key search_key;
> struct inode *inode;
> u64 ino;
next prev parent reply other threads:[~2021-12-31 13:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-31 12:23 Jiapeng Chong
2021-12-31 13:07 ` Qu Wenruo [this message]
2022-01-03 18:21 ` David Sterba
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=f6aa56ee-16b2-9a53-2377-07d638b1289b@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=abaci@linux.alibaba.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@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®