From: Dan Carpenter <dan.carpenter@oracle.com>
To: Liam Howlett <liam.howlett@oracle.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>,
Matthew Wilcox <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org>
Subject: Re: [PATCH 0/1] Dead stores in maple-tree
Date: Thu, 27 Oct 2022 10:43:15 +0300 [thread overview]
Message-ID: <Y1o2k+2PTMJ2X9QA@kadam> (raw)
In-Reply-To: <20221026142259.mvcbtmj3kde5y25g@revolver>
On Wed, Oct 26, 2022 at 02:23:19PM +0000, Liam Howlett wrote:
> * Lukas Bulwahn <lukas.bulwahn@gmail.com> [221026 08:01]:
> > Dear maple-tree authors, dear Liam, dear Matthew,
> >
> > there are some Dead Stores that clang-analyzer reports:
> >
> > lib/maple_tree.c:2906:2: warning: Value stored to 'last' is never read [clang-analyzer-deadcode.DeadStores]
> > lib/maple_tree.c:2907:2: warning: Value stored to 'prev_min' is never read [clang-analyzer-deadcode.DeadStores]
> >
> > I addressed these two cases, which were most obvious and clear to fix;
> > see patch of this one-element series.
> >
> > Further, clang-analyzer reports more, which I did not address:
> >
> > lib/maple_tree.c:332:2: warning: Value stored to 'node' is never read [clang-analyzer-deadcode.DeadStores]
> > lib/maple_tree.c:337:2: warning: Value stored to 'node' is never read [clang-analyzer-deadcode.DeadStores]
> >
> > Unclear to me if the tool is wrong or right in its analysis here for the two functions above.
>
> The tool is correct but these aren't going anywhere. They are compiled
> out and are needed for the future.
>
lib/maple_tree.c
330 static inline void mte_set_full(const struct maple_enode *node)
331 {
332 node = (void *)((unsigned long)node & ~MAPLE_ENODE_NULL);
333 }
334
335 static inline void mte_clear_full(const struct maple_enode *node)
336 {
337 node = (void *)((unsigned long)node | MAPLE_ENODE_NULL);
338 }
That code is really puzzling... How far into the future before it starts
making sense?
regards,
dan carpenter
next prev parent reply other threads:[~2022-10-27 7:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-26 12:00 [PATCH 0/1] Dead stores in maple-tree Lukas Bulwahn
2022-10-26 12:00 ` [PATCH 1/1] lib: maple_tree: remove unneeded initialization in mtree_range_walk() Lukas Bulwahn
2022-10-26 14:25 ` Liam Howlett
2022-10-26 14:23 ` [PATCH 0/1] Dead stores in maple-tree Liam Howlett
2022-10-27 7:43 ` Dan Carpenter [this message]
2022-10-27 17:16 ` Liam Howlett
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=Y1o2k+2PTMJ2X9QA@kadam \
--to=dan.carpenter@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=liam.howlett@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lukas.bulwahn@gmail.com \
--cc=maple-tree@lists.infradead.org \
--cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).