[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNATf=1WD5a8azGZGJ73-irm8uvBZujvuW3CUncXbix+10w@mail.gmail.com>
Date: Tue, 24 Sep 2024 13:21:55 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: David Hunter <david.hunter.linux@...il.com>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
shuah@...nel.org, javier.carrasco.cruz@...il.com
Subject: Re: [PATCH 7/7] linux-kbuild: fix: process config options set to "y"
On Sat, Sep 14, 2024 at 2:13 AM David Hunter
<david.hunter.linux@...il.com> wrote:
>
> The goal of "make localmodconfig" is to turn off modules that are not
> necessary. Some modules are necessary because they are depended on by
> config options set with a "y."
>
> Process configs set to "y" so that the modules that are depended on
> will not be turned off later.
You need to put the explanation in the cover letter.
Without reading the cover-letter, I do not understand
why this change is needed.
> Signed-off-by: David Hunter <david.hunter.linux@...il.com>
> ---
> scripts/kconfig/streamline_config.pl | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
> index 948437aac535..762bf80408c7 100755
> --- a/scripts/kconfig/streamline_config.pl
> +++ b/scripts/kconfig/streamline_config.pl
> @@ -466,6 +466,11 @@ foreach my $line (@config_file) {
>
> if (/(CONFIG_[$valid]*)=(m|y)/) {
> $orig_configs{$1} = $2;
> + # all configs options set to 'y' need to be processed
> + if($2 eq "y") {
> + $configs{$1}= $2;
> + }
> +
You are breaking the indentation style.
Check how the current code is indented.
(tab and spaces).
A space is needed after 'if'
for coding style consistency.
> }
> }
>
> @@ -596,9 +601,11 @@ sub loop_depend {
> forloop:
> foreach my $config (keys %configs) {
>
> - # If this config is not a module, we do not need to process it
> - if (defined($orig_configs{$config}) && $orig_configs{$config} ne "m") {
> - next forloop;
> + # If this config is not set in the original config,
> + # we do not need to process it
> + if (defined($orig_configs{$config}) && $orig_configs{$config} ne "m"
> + && $orig_configs{$config} ne "y") {
> + next forloop;
> }
I do not understand the condition:
defined($orig_configs{$config}) && $orig_configs{$config} ne "m"
&& $orig_configs{$config} ne "y"
Is there any case when this condition is met?
> $config =~ s/^CONFIG_//;
> --
> 2.43.0
>
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists