]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kconfig: refactor expr_eliminate_dups()
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 8 Sep 2024 12:43:19 +0000 (21:43 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Fri, 20 Sep 2024 00:21:52 +0000 (09:21 +0900)
commit440f67ccdcd31ca33d8d0439b16e4b6d4d7aba17
tree1a54f7187f235e19919066d65f1ba0bb177eab35
parent4fa146eaecaee6301e8f5b104fe63b41afdf83e6
kconfig: refactor expr_eliminate_dups()

Currently, expr_eliminate_dups() passes two identical pointers down to
expr_eliminate_dups1(), which later skips processing identical leaves.

This approach is somewhat tricky and, more importantly, it will not work
with the refactoring made in the next commit.

This commit slightly changes the recursion logic; it deduplicates both
the left and right arms, and then passes them to expr_eliminate_dups1().
expr_eliminate_dups() should produce the same result.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/expr.c