]> err.no Git - linux-2.6/commitdiff
kbuild: fix perl usage in export_report.pl
authorRam Pai <linuxram@us.ibm.com>
Fri, 24 Aug 2007 22:32:22 +0000 (15:32 -0700)
committerSam Ravnborg <sam@neptun.(none)>
Fri, 12 Oct 2007 19:13:50 +0000 (21:13 +0200)
Fixes some subtle perl coding bug observed
by Jan Engelhardt <jengelh@computergmbh.de>
This patch applies on top of Adrian's fix.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Acked-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/export_report.pl

index 08ceb42c19bbf09b07c9ce630ff989186feffcca..705b5ba7c1526c65bbcf2d0868f2a2f007a158e9 100644 (file)
@@ -103,15 +103,15 @@ foreach my $thismod (@allcfiles) {
        my $state=0;
        while ( <MODULE_MODULE> ) {
                chomp;
-               if ($state eq 0) {
+               if ($state == 0) {
                        $state = 1 if ($_ =~ /static const struct modversion_info/);
                        next;
                }
-               if ($state eq 1) {
+               if ($state == 1) {
                        $state = 2 if ($_ =~ /__attribute__\(\(section\("__versions"\)\)\)/);
                        next;
                }
-               if ($state eq 2) {
+               if ($state == 2) {
                        if ( $_ !~ /0x[0-9a-f]+,/ ) {
                                next;
                        }
@@ -121,7 +121,7 @@ foreach my $thismod (@allcfiles) {
                        push(@{$MODULE{$thismod}} , $sym);
                }
        }
-       if ($state ne 2) {
+       if ($state != 2) {
                print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n";
        }
        close(MODULE_MODULE);