diff options
| author | 2010-08-16 14:40:44 -0400 | |
|---|---|---|
| committer | 2010-08-16 14:40:44 -0400 | |
| commit | 9714d315d28aef77a097fe905b25cc273c3d72ad (patch) | |
| tree | 0ae1150b0723e925785ce774c3554f29fda050f6 /scripts/checkstack.pl | |
| parent | b43: move hwrng registration driver to wireless core initialization (diff) | |
| parent | ath5k: disable ASPM L0s for all cards (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'scripts/checkstack.pl')
| -rwxr-xr-x | scripts/checkstack.pl | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index 14ee68e991dd..1afff6658a7d 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl @@ -21,6 +21,8 @@ # # TODO : Port to all architectures (one regex per arch) +use strict; + # check for arch # # $re is used for two matches: @@ -104,19 +106,11 @@ my (@stack, $re, $dre, $x, $xs); } } -sub bysize($) { - my ($asize, $bsize); - ($asize = $a) =~ s/.*: *(.*)$/$1/; - ($bsize = $b) =~ s/.*: *(.*)$/$1/; - $bsize <=> $asize -} - # # main() # my $funcre = qr/^$x* <(.*)>:$/; -my $func; -my $file, $lastslash; +my ($func, $file, $lastslash); while (my $line = <STDIN>) { if ($line =~ m/$funcre/) { @@ -173,4 +167,6 @@ while (my $line = <STDIN>) { } } -print sort bysize @stack; +# Sort output by size (last field) +print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack; + |
