Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

profile2linkerlist: fix perl warnings

Turn on strict checking.
Simplify code by using "unless" statement.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>

authored by

Stephen Hemminger and committed by
Michal Marek
9c49fd30 86d08e56

+3 -5
+3 -5
scripts/profile2linkerlist.pl
··· 7 7 # usage: 8 8 # readprofile | sort -rn | perl profile2linkerlist.pl > functionlist 9 9 # 10 + use strict; 10 11 11 12 while (<>) { 12 13 my $line = $_; 13 14 14 15 $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/; 15 16 16 - if ( ($line =~ /unknown/) || ($line =~ /total/)) { 17 - 18 - } else { 19 - print "*(.text.$1)\n"; 20 - } 17 + print "*(.text.$1)\n" 18 + unless ($line =~ /unknown/) || ($line =~ /total/); 21 19 }