aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/streamline_config.pl
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2013-04-29 15:18:38 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-04-29 15:41:51 -0400
commitced9cb1af1e3486cc14dca755a1b3fbadf06e90b (patch)
tree67501303c76d035fd8979ed073229c73fbaa1d17 /scripts/kconfig/streamline_config.pl
parentbc20d12eca43028548e5a4f655c2070e57bede1c (diff)
localmodconfig: Process source kconfig files as they are found
A bug was reported that caused localmodconfig to not keep all the dependencies of ATH9K. This was caused by the kconfig file: In drivers/net/wireless/ath/Kconfig: --- if ATH_CARDS config ATH_DEBUG bool "Atheros wireless debugging" ---help--- Say Y, if you want to debug atheros wireless drivers. Right now only ath9k makes use of this. source "drivers/net/wireless/ath/ath5k/Kconfig" source "drivers/net/wireless/ath/ath9k/Kconfig" source "drivers/net/wireless/ath/carl9170/Kconfig" source "drivers/net/wireless/ath/ath6kl/Kconfig" source "drivers/net/wireless/ath/ar5523/Kconfig" source "drivers/net/wireless/ath/wil6210/Kconfig" endif --- The current way kconfig works, it processes new source files after the first file is completed. It creates an array of new source config files and when the one file is finished, it continues with the next file. Unfortunately, this means that it loses the fact that the source file is within an "if" statement, and this means that each of these source file's configs will not have the proper dependencies set. As ATH9K requires ATH_CARDS set, the localmodconfig did not see that dependency, and did not enable ATH_CARDS. When the oldconfig was run, it forced ATH9K to be disabled. Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1304291022320.9234@oneiric Cc: stable@vger.kernel.org # 3.8+ Reported-by: Robert P. J. Day <rpjday@crashcourse.ca> Tested-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'scripts/kconfig/streamline_config.pl')
-rw-r--r--scripts/kconfig/streamline_config.pl17
1 files changed, 7 insertions, 10 deletions
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 343a56863660..4606cdfb859d 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -156,7 +156,6 @@ sub read_kconfig {
156 156
157 my $state = "NONE"; 157 my $state = "NONE";
158 my $config; 158 my $config;
159 my @kconfigs;
160 159
161 my $cont = 0; 160 my $cont = 0;
162 my $line; 161 my $line;
@@ -190,7 +189,13 @@ sub read_kconfig {
190 189
191 # collect any Kconfig sources 190 # collect any Kconfig sources
192 if (/^source\s*"(.*)"/) { 191 if (/^source\s*"(.*)"/) {
193 $kconfigs[$#kconfigs+1] = $1; 192 my $kconfig = $1;
193 # prevent reading twice.
194 if (!defined($read_kconfigs{$kconfig})) {
195 $read_kconfigs{$kconfig} = 1;
196 read_kconfig($kconfig);
197 }
198 next;
194 } 199 }
195 200
196 # configs found 201 # configs found
@@ -250,14 +255,6 @@ sub read_kconfig {
250 } 255 }
251 } 256 }
252 close($kinfile); 257 close($kinfile);
253
254 # read in any configs that were found.
255 foreach my $kconfig (@kconfigs) {
256 if (!defined($read_kconfigs{$kconfig})) {
257 $read_kconfigs{$kconfig} = 1;
258 read_kconfig($kconfig);
259 }
260 }
261} 258}
262 259
263if ($kconfig) { 260if ($kconfig) {