]> git.baikalelectronics.ru Git - kernel.git/commit
maple_tree: mas_anode_descend() clang-analyzer cleanup
authorLiam Howlett <liam.howlett@oracle.com>
Wed, 26 Oct 2022 15:14:31 +0000 (15:14 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 8 Nov 2022 23:57:22 +0000 (15:57 -0800)
commita3f5fd6fa3873f56647686e7a44ba6feef9c4f0f
treed4811be68ebb074b6dccd510f2fa41c7e4a57d53
parentd80e7ec519cfe9a84c8e78c1d6ca3dc3344c19c8
maple_tree: mas_anode_descend() clang-analyzer cleanup

clang-analyzer reported some Dead Stores in mas_anode_descend().  Upon
inspection, there were a few clean ups that would make the code cleaner:

The count variable was set from the mt_slots array and then updated but
never used again.  Just use the array reference directly.

Also stop updating the type since it isn't used after the update.

Stop setting the gaps pointer to NULL at the start since it is always
set before the loop begins.

Link: https://lkml.kernel.org/r/20221026151413.4032730-1-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c