Track default options on the second line. On the second line of some
config entries, default and depndency options sometimes appear. In those
instances, the state will be "NEW" and not "DEP".
Signed-off-by: David Hunter <david.hunter.linux@gmail.com>
---
V1 https://lore.kernel.org/all/20240913171205.22126-4-david.hunter.linux@gmail.com/
V2
- changed the subject
- changed the condition to be more in line with the script style
---
scripts/kconfig/streamline_config.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index a85d6a3108a1..85f4712e2bf3 100755
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -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+//;
--
2.43.0
On Mon, Oct 14, 2024 at 11:14 PM David Hunter <david.hunter.linux@gmail.com> wrote: > > Track default options on the second line. On the second line of some > config entries, default and depndency options sometimes appear. In those > instances, the state will be "NEW" and not "DEP". > > Signed-off-by: David Hunter <david.hunter.linux@gmail.com> > --- > V1 https://lore.kernel.org/all/20240913171205.22126-4-david.hunter.linux@gmail.com/ > > V2 > - changed the subject > - changed the condition to be more in line with the script style > --- Applied to kbuild with the typo fixed. Thanks. > scripts/kconfig/streamline_config.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl > index a85d6a3108a1..85f4712e2bf3 100755 > --- a/scripts/kconfig/streamline_config.pl > +++ b/scripts/kconfig/streamline_config.pl > @@ -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+//; > -- > 2.43.0 > -- Best Regards Masahiro Yamada
On Mon, 14 Oct 2024 10:13:32 -0400 David Hunter <david.hunter.linux@gmail.com> wrote: Hi David, Thanks for sending these. > Track default options on the second line. On the second line of some > config entries, default and depndency options sometimes appear. In those "dependency" > instances, the state will be "NEW" and not "DEP". Can you list some examples of where this happens? Thanks, -- Steve > > Signed-off-by: David Hunter <david.hunter.linux@gmail.com> > --- > V1 https://lore.kernel.org/all/20240913171205.22126-4-david.hunter.linux@gmail.com/ > > V2 > - changed the subject > - changed the condition to be more in line with the script style > --- > scripts/kconfig/streamline_config.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl > index a85d6a3108a1..85f4712e2bf3 100755 > --- a/scripts/kconfig/streamline_config.pl > +++ b/scripts/kconfig/streamline_config.pl > @@ -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+//;
On Wed, Oct 16, 2024 at 8:09 AM Steven Rostedt <rostedt@goodmis.org> wrote: > > On Mon, 14 Oct 2024 10:13:32 -0400 > David Hunter <david.hunter.linux@gmail.com> wrote: > > Hi David, > > Thanks for sending these. > > > Track default options on the second line. On the second line of some > > config entries, default and depndency options sometimes appear. In those > "dependency" > > > instances, the state will be "NEW" and not "DEP". > > Can you list some examples of where this happens? As described in the commit log, the def_bool, def_trristate, and default can appear in the second line. config FOO def_tristate BAR Then, FOO has dependency on BAR. > Thanks, > > -- Steve > > > > > Signed-off-by: David Hunter <david.hunter.linux@gmail.com> > > --- > > V1 https://lore.kernel.org/all/20240913171205.22126-4-david.hunter.linux@gmail.com/ > > > > V2 > > - changed the subject > > - changed the condition to be more in line with the script style > > --- > > scripts/kconfig/streamline_config.pl | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl > > index a85d6a3108a1..85f4712e2bf3 100755 > > --- a/scripts/kconfig/streamline_config.pl > > +++ b/scripts/kconfig/streamline_config.pl > > @@ -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+//; > -- Best Regards Masahiro Yamada
From: david.hunter.linux@gmail.com There are many instances of the second line of a config entry containing infomation about defaults. Here is a summary: def_bools found: 746 def_tristates found: 59 defaults found: 169 > Can you list some examples of where this happens? I created a file that finds all the times that a default information is given in the line following a CONFIG entry is created. Here is a link for the output, which will show the file and the line numbers: https://github.com/dshunter107/linux-tools/blob/main/localmodconfig/defaults.output If you would like to see the shell script I made to find the locations, you can view it at this link: https://github.com/dshunter107/linux-tools/blob/main/localmodconfig/check_define.sh
On Tue, 26 Nov 2024 18:48:13 -0500 David Hunter <david.hunter.linux@gmail.com> wrote: > From: david.hunter.linux@gmail.com > > There are many instances of the second line of a config entry containing infomation about defaults. Here is a summary: > > def_bools found: 746 > def_tristates found: 59 > defaults found: 169 > > > Can you list some examples of where this happens? > > I created a file that finds all the times that a default information is given in the line following a CONFIG entry is created. Here is a link for the output, which will show the file and the line numbers: > > https://github.com/dshunter107/linux-tools/blob/main/localmodconfig/defaults.output > > If you would like to see the shell script I made to find the locations, you can view it at this link: > > https://github.com/dshunter107/linux-tools/blob/main/localmodconfig/check_define.sh > Thanks, can you ping me again next week. I'm still finishing up this merge window and have a lot of tasks that need to get done before Thanksgiving, and will be taking a break from computing during the Holiday. I'm not going to have time to look at this this week, and will likely forget about it. -- Steve
© 2016 - 2024 Red Hat, Inc.