From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, willy@infradead.org,
Liam.Howlett@oracle.com, lukas.bulwahn@gmail.com,
akpm@linux-foundation.org
Subject: [merged mm-hotfixes-stable] lib-maple_tree-remove-unneeded-initialization-in-mtree_range_walk.patch removed from -mm tree
Date: Fri, 28 Oct 2022 14:07:32 -0700 [thread overview]
Message-ID: <20221028210733.2E497C433D6@smtp.kernel.org> (raw)
The quilt patch titled
Subject: lib: maple_tree: remove unneeded initialization in mtree_range_walk()
has been removed from the -mm tree. Its filename was
lib-maple_tree-remove-unneeded-initialization-in-mtree_range_walk.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Subject: lib: maple_tree: remove unneeded initialization in mtree_range_walk()
Date: Wed, 26 Oct 2022 14:00:29 +0200
Before the do-while loop in mtree_range_walk(), the variables next, min,
max need to be initialized. The variables last, prev_min and prev_max are
set within the loop body before they are eventually used after exiting the
loop body.
As it is a do-while loop, the loop body is executed at least once, so the
variables last, prev_min and prev_max do not need to be initialized before
the loop body.
Remove unneeded initialization of last and prev_min.
The needless initialization was reported by clang-analyzer as Dead Stores.
As the compiler already identifies these assignments as unneeded, it
optimizes the assignments away. Hence:
No functional change. No change in object code.
Link: https://lkml.kernel.org/r/20221026120029.12555-2-lukas.bulwahn@gmail.com
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
--- a/lib/maple_tree.c~lib-maple_tree-remove-unneeded-initialization-in-mtree_range_walk
+++ a/lib/maple_tree.c
@@ -2903,8 +2903,8 @@ static inline void *mtree_range_walk(str
unsigned long max, min;
unsigned long prev_max, prev_min;
- last = next = mas->node;
- prev_min = min = mas->min;
+ next = mas->node;
+ min = mas->min;
max = mas->max;
do {
offset = 0;
_
Patches currently in -mm which might be from lukas.bulwahn@gmail.com are
mm-shmem-remove-unneeded-assignments-in-shmem_get_folio_gfp.patch
reply other threads:[~2022-10-28 21:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221028210733.2E497C433D6@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=Liam.Howlett@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=mm-commits@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.