Skip to contentSkip to conversation

kconfig: Fix variable name typo in streamline_config.pl.

PATCH In review hiromu yagura 3 participants 4 messages Aug 15, 2010 – Aug 17, 2010 Kconfig

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kconfig: Fix variable name typo in streamline_config.pl.

When I added "use strict;" to streamline_config.pl, I saw following warnings.

Quoted 1 line

Global symbol "%prompt" requires explicit package name at

scripts/kconfig/streamline_config.pl line 183.

Quoted 1 line

Global symbol "%prompt" requires explicit package name at

scripts/kconfig/streamline_config.pl line 368.

Let's fix it.
(Note: prompts[] is defined at line 123 but never used. This seems typo.)

Cc Steven Rostedt <[email protected]>
Cc Toralf Foerster <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
Cc YOSHIFUJI Hideaki <[email protected]>
---
 scripts/kconfig/streamline_config.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/scripts/kconfig/streamline_config.pl
index c70a27d..d74363f 100644

scripts/kconfig/streamline_config.pl +2 -2
@@ -178,7 +178,7 @@ sub read_kconfig {
 	# configs without prompts must be selected
 	} elsif ($state ne "NONE" && /^\s*tristate\s\S/) {
 	    # note if the config has a prompt
-	    $prompt{$config} = 1;
+	    $prompts{$config} = 1;
 
 	# Check for if statements
 	} elsif (/^if\s+(.*\S)\s*$/) {
@@ -363,7 +363,7 @@ while ($repeat) {
 	    parse_config_dep_select $depends{$config};
 	}
 
-	if (defined($prompt{$config}) || !defined($selects{$config})) {
+	if (defined($prompts{$config}) || !defined($selects{$config})) {
 	    next;
 	}
 
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · hiromu yagura

When I added "use strict;" to streamline_config.pl, I saw following warnings.

Quoted 1 line

Global symbol "%prompt" requires explicit package name at

scripts/kconfig/streamline_config.pl line 183.

Quoted 1 line

Global symbol "%prompt" requires explicit package name at

scripts/kconfig/streamline_config.pl line 368.

Let's fix it.
(Note: prompts[] is defined at line 123 but never used. This seems typo.)

Quoted 6 lines
Cc Steven Rostedt <[email protected]>
Cc Toralf Foerster <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
Cc YOSHIFUJI Hideaki <[email protected]>

BTW, I think we should add "use strict;" too.

Quoted 37 lines

---
scripts/kconfig/streamline_config.pl | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
scripts/kconfig/streamline_config.pl +2 -2
index c70a27d..d74363f 100644
@@ -178,7 +178,7 @@ sub read_kconfig {
 	# configs without prompts must be selected
 	} elsif ($state ne "NONE" && /^\s*tristate\s\S/) {
 	    # note if the config has a prompt
-	    $prompt{$config} = 1;
+	    $prompts{$config} = 1;
 
 	# Check for if statements
 	} elsif (/^if\s+(.*\S)\s*$/) {
@@ -363,7 +363,7 @@ while ($repeat) {
 	    parse_config_dep_select $depends{$config};
 	}
 
-	if (defined($prompt{$config}) || !defined($selects{$config})) {
+	if (defined($prompts{$config}) || !defined($selects{$config})) {
 	    next;
 	}
 
Signature · 9 lines
1.7.0.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
author
#2 lore raw
Quoted 3 lines · Américo Wang

BTW, I think we should add "use strict;" too.

Then I added "use strict;" to streamline_config.pl, I saw another warings.

Quoted 1 line

Global symbol "$dir" requires explicit package name at

scripts/kconfig/streamline_config.pl line 286.

Quoted 1 line

Global symbol "$dir" requires explicit package name at

scripts/kconfig/streamline_config.pl line 287.

Quoted 1 line

Global symbol "$dir" requires explicit package name at

scripts/kconfig/streamline_config.pl line 288.

Then I added "my $dir;" to line 285.

Cc Américo Wang <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Toralf Foerster <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
Cc YOSHIFUJI Hideaki <[email protected]>
---
 scripts/kconfig/streamline_config.pl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/scripts/kconfig/streamline_config.pl
index d74363f..9ca361a 100644

scripts/kconfig/streamline_config.pl +3 -0
@@ -42,6 +42,8 @@
 #    mv config_strip .config
 #    make oldconfig
 #
+use strict;
+
 my $config = ".config";
 
 my $uname = `uname -r`;
@@ -280,6 +282,7 @@ if (defined($lsmod_file)) {
 
     # see what modules are loaded on this system
     my $lsmod;
+    my $dir;
 
     foreach $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) {
        if ( -x "$dir/lsmod" ) {
Signature · 1 line
1.7.0.4
#3 lore raw
Quoted 8 lines · hiromu
Quoted 3 lines · Américo Wang

BTW, I think we should add "use strict;" too.

Then I added "use strict;" to streamline_config.pl, I saw another warings.

Quoted 8 lines
Quoted 1 line

Global symbol "$dir" requires explicit package name at

scripts/kconfig/streamline_config.pl line 286.

Quoted 1 line

Global symbol "$dir" requires explicit package name at

scripts/kconfig/streamline_config.pl line 287.

Quoted 1 line

Global symbol "$dir" requires explicit package name at

scripts/kconfig/streamline_config.pl line 288.

Then I added "my $dir;" to line 285.

Thanks! I'll pull this in today.

-- Steve

Quoted 34 lines
Cc Américo Wang <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Toralf Foerster <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
Cc YOSHIFUJI Hideaki <[email protected]>
---
 scripts/kconfig/streamline_config.pl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
scripts/kconfig/streamline_config.pl +3 -0
index d74363f..9ca361a 100644
@@ -42,6 +42,8 @@
 #    mv config_strip .config
 #    make oldconfig
 #
+use strict;
+
 my $config = ".config";
 
 my $uname = `uname -r`;
@@ -280,6 +282,7 @@ if (defined($lsmod_file)) {
 
     # see what modules are loaded on this system
     my $lsmod;
+    my $dir;
 
     foreach $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) {
        if ( -x "$dir/lsmod" ) {