From cf5a189d4a02efb3712cfb424452f4ce3ab7c4a2 Mon Sep 17 00:00:00 2001 From: hiromu Date: Tue, 17 Aug 2010 19:49:18 +0900 Subject: kconfig: Fix missing declaration of variable $dir in streamline_config.pl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Fri, Aug 17, 2010 at 01:43PM +0800, Américo Wang wrote: > Acked-by: WANG Cong > > BTW, I think we should add "use strict;" too. Then I added "use strict;" to streamline_config.pl, I saw another warning. > Global symbol "$dir" requires explicit package name at scripts/kconfig/streamline_config.pl line 286. > Global symbol "$dir" requires explicit package name at scripts/kconfig/streamline_config.pl line 287. > 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 Cc: Toralf Foerster Cc: KAMEZAWA Hiroyuki Cc: YOSHIFUJI Hideaki Signed-off-by: Hiromu Yakura LKML-Reference: <1282042158.7160.9.camel@hiromu-Macbook> [ changed to just add my in front of $dir instead of new line ] Signed-off-by: Steven Rostedt --- scripts/kconfig/streamline_config.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/kconfig/streamline_config.pl') diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index 3c63aa9..883748c 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl @@ -42,6 +42,8 @@ # mv config_strip .config # make oldconfig # +use strict; + my $config = ".config"; my $uname = `uname -r`; @@ -291,7 +293,7 @@ if (defined($lsmod_file)) { # see what modules are loaded on this system my $lsmod; - foreach $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) { + foreach my $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) { if ( -x "$dir/lsmod" ) { $lsmod = "$dir/lsmod"; last; -- cgit v1.1