]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
streamline_config.pl: ensure all defaults are tracked
authorDavid Hunter <david.hunter.linux@gmail.com>
Mon, 14 Oct 2024 14:13:32 +0000 (10:13 -0400)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 5 Nov 2024 23:46:33 +0000 (08:46 +0900)
Track default options on the second line. On the second line of some
config entries, default and dependency options sometimes appear. In those
instances, the state will be "NEW" and not "DEP".

Signed-off-by: David Hunter <david.hunter.linux@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/streamline_config.pl

index a85d6a3108a1cfedeb80d87376fbcdb128fd162e..85f4712e2bf32eca966f3c0d3e03b11b98e32d6a 100755 (executable)
@@ -220,7 +220,7 @@ sub read_kconfig {
            $depends{$config} = $1;
        } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) {
            $depends{$config} .= " " . $1;
-       } elsif ($state eq "DEP" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) {
+       } elsif ($state ne "NONE" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) {
            my $dep = $3;
            if ($dep !~ /^\s*(y|m|n)\s*$/) {
                $dep =~ s/.*\sif\s+//;