Return-Path: Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:37528 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752427Ab0J2Fo1 (ORCPT ); Fri, 29 Oct 2010 01:44:27 -0400 Message-Id: <20101029054424.066991090@goodmis.org> Date: Fri, 29 Oct 2010 01:43:13 -0400 From: Steven Rostedt Subject: [PATCH 3/5] [PATCH 3/5] kconfig: Fix missing declaration of variable $dir in streamline_config.pl References: <20101029054310.790179545@goodmis.org> Content-Disposition: inline; filename=0003-kconfig-Fix-missing-declaration-of-variable-dir-in-s.patch Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Andrew Morton , Michal Marek , linux-kbuild@vger.kernel.org, =?ISO-8859-15?q?Am=C3=A9rico=20Wang?= , Toralf Foerster , KAMEZAWA Hiroyuki , YOSHIFUJI Hideaki , Hiromu Yakura From: hiromu 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 files changed, 3 insertions(+), 1 deletions(-) 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; -- 1.7.1