From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
To: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
maple-tree@lists.infradead.org, linux-mm@kvack.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] maple_tree: avoid duplicate variable init in mast_spanning_rebalance()
Date: Mon, 22 Jan 2024 09:58:16 -0500 [thread overview]
Message-ID: <20240122145816.unmy537vtaqflhfu@revolver> (raw)
In-Reply-To: <20240122102000.29558-1-lukas.bulwahn@gmail.com>
* Lukas Bulwahn <lukas.bulwahn@gmail.com> [240122 05:22]:
> The local variables r_tmp and l_tmp in mast_spanning_rebalance() are
> already initialized at its declaration; there is no need to assign the
> value again.
>
> Remove the duplicate initialization of {r,l}_tmp. No functional change.
> Due to common compiler optimizations, also no change to object code.
Hello!
Thanks for this patch and well stated change log.
>
> This issue was identified with clang-analyzer's dead stores analysis.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
> ---
> lib/maple_tree.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/lib/maple_tree.c b/lib/maple_tree.c
> index 7b161802860b..82fb5195c235 100644
> --- a/lib/maple_tree.c
> +++ b/lib/maple_tree.c
> @@ -2271,8 +2271,6 @@ bool mast_spanning_rebalance(struct maple_subtree_state *mast)
> struct ma_state l_tmp = *mast->orig_l;
> unsigned char depth = 0;
>
> - r_tmp = *mast->orig_r;
> - l_tmp = *mast->orig_l;
> do {
> mas_ascend(mast->orig_r);
> mas_ascend(mast->orig_l);
> --
> 2.17.1
>
prev parent reply other threads:[~2024-01-22 14:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 10:20 Lukas Bulwahn
2024-01-22 14:58 ` Liam R. Howlett [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=20240122145816.unmy537vtaqflhfu@revolver \
--to=liam.howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lukas.bulwahn@gmail.com \
--cc=maple-tree@lists.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