lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220103182146.GN28560@twin.jikos.cz>
Date:   Mon, 3 Jan 2022 19:21:46 +0100
From:   David Sterba <dsterba@...e.cz>
To:     Qu Wenruo <quwenruo.btrfs@....com>
Cc:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>, clm@...com,
        josef@...icpanda.com, dsterba@...e.com,
        linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH] btrfs: Remove redundant initialization of slot

On Fri, Dec 31, 2021 at 09:07:45PM +0800, Qu Wenruo wrote:
> 
> 
> 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@...ux.alibaba.com>
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.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?

Yes, the variable leaf does not need to be initialized as well, both
should be cleaned up in the same patch.

> And again, no feedback no matter what on other patches from you, and
> still CC to maintainers.

It's better to add the CCs than not, don't worry about that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ