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

export_report: sort SECTION 2 output

Sort SECTION 2 modules by name. Within those module listings, sort
the symbol providers by name, and remove the count, as it is
misleading; its the kernel-wide count of uses of that symbol, not the
count pertaining to the module being outlined. (this can be seen by
grepping the output for a single symbol). The count is still used to
sort the symbols.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

authored by

Jim Cromie and committed by
Michal Marek
bdabc7a3 de7b0b41

+5 -3
+5 -3
scripts/export_report.pl
··· 25 25 sub print_depends_on { 26 26 my ($href) = @_; 27 27 print "\n"; 28 - while (my ($mod, $list) = each %$href) { 28 + for my $mod (sort keys %$href) { 29 + my $list = $href->{$mod}; 29 30 print "\t$mod:\n"; 30 31 foreach my $sym (sort numerically @{$list}) { 31 32 my ($symbol, $no) = split /\s+/, $sym; 32 - printf("\t\t%-25s\t%-25d\n", $symbol, $no); 33 + printf("\t\t%-25s\n", $symbol); 33 34 } 34 35 print "\n"; 35 36 } ··· 167 166 it uses. Each listed symbol reports the number of modules using it\n"); 168 167 169 168 print "~"x80 , "\n"; 170 - while (my ($thismod, $list) = each %MODULE) { 169 + for my $thismod (sort keys %MODULE) { 170 + my $list = $MODULE{$thismod}; 171 171 my %depends; 172 172 $thismod =~ s/\.mod\.c/.ko/; 173 173 print "\t\t\t$thismod\n";