Dead stores in maple-tree
Status from this message: [merged mm-hotfixes-stable] lib-maple_tree-remove-unneeded-initialization-in-mtree_range_walk.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 1 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | lib: maple_tree: remove unneeded initialization in mtree_range_walk()lib/ | +2 | 1 reply | Applied |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Liam R. Howlett |
|---|---|
| 1/1 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/1] Dead stores in maple-tree
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.
lib/maple_tree.c:1212:23: warning: Value stored to 'nodep' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
A lot of pointer magic. Unclear to me if the tool is wrong or right in its analysis here.
lib/maple_tree.c:5014:5: warning: Value stored to 'count' is never read [clang-analyzer-deadcode.DeadStores]
Unclear if the code is intended as it is now.
In mas_anode_descend(), the variable count is really just assigned and used once effectively. The second assignment is never read. So, the variable count could just be removed in mas_anode_descend().
Maybe these further warnings are helpful to clean up the code or find an issue that was overlooked so far.
Best regards,
Lukas
Lukas Bulwahn (1):
lib: maple_tree: remove unneeded initialization in mtree_range_walk()
lib/maple_tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1