From 9c49fd307a6cb2d3255f9441bce5b7cb08dff79e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 22 Feb 2010 15:17:20 -0800 Subject: profile2linkerlist: fix perl warnings Turn on strict checking. Simplify code by using "unless" statement. Signed-off-by: Stephen Hemminger Acked-by: WANG Cong Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Michal Marek --- scripts/profile2linkerlist.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/profile2linkerlist.pl b/scripts/profile2linkerlist.pl index cb4260ebdb91..6943fa7cc95b 100644 --- a/scripts/profile2linkerlist.pl +++ b/scripts/profile2linkerlist.pl @@ -7,15 +7,13 @@ # usage: # readprofile | sort -rn | perl profile2linkerlist.pl > functionlist # +use strict; while (<>) { my $line = $_; $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/; - if ( ($line =~ /unknown/) || ($line =~ /total/)) { - - } else { - print "*(.text.$1)\n"; - } + print "*(.text.$1)\n" + unless ($line =~ /unknown/) || ($line =~ /total/); } -- cgit v1.2.3-59-g8ed1b