Skip to content

Commit bf98f6d

Browse files
David Huntermasahir0y
authored andcommitted
streamline_config.pl: remove prompt warnings for configs with defaults
Ignore process select warnings for config entries that have a default option. Some config entries have no prompt, and nothing selects them, but these config options are okay because they have a default option. Signed-off-by: David Hunter <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 90edd30 commit bf98f6d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/kconfig/streamline_config.pl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ sub read_config {
144144
my %prompts;
145145
my %objects;
146146
my %config2kfile;
147+
my %defaults;
147148
my $var;
148149
my $iflevel = 0;
149150
my @ifdeps;
@@ -222,6 +223,7 @@ sub read_kconfig {
222223
$depends{$config} .= " " . $1;
223224
} elsif ($state ne "NONE" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) {
224225
my $dep = $3;
226+
$defaults{$config} = 1;
225227
if ($dep !~ /^\s*(y|m|n)\s*$/) {
226228
$dep =~ s/.*\sif\s+//;
227229
$depends{$config} .= " " . $dep;
@@ -523,8 +525,16 @@ sub parse_config_selects
523525

524526
# If no possible config selected this, then something happened.
525527
if (!defined($next_config)) {
526-
print STDERR "WARNING: $config is required, but nothing in the\n";
527-
print STDERR " current config selects it.\n";
528+
529+
# Some config options have no prompt, and nothing selects them, but
530+
# they stay turned on once the final checks for the configs
531+
# are done. These configs have a default option, so turn off the
532+
# warnings for configs with default options.
533+
if (!defined($defaults{$config})) {
534+
print STDERR "WARNING: $config is required, but nothing in the\n";
535+
print STDERR " current config selects it.\n";
536+
}
537+
528538
return;
529539
}
530540

0 commit comments

Comments
 (0)