Skip to content

Commit bdabc7a

Browse files
jimcmichal42
authored andcommitted
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>
1 parent de7b0b4 commit bdabc7a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎scripts/export_report.pl‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ sub alphabetically {
2525
sub print_depends_on {
2626
my ($href) = @_;
2727
print "\n";
28-
while (my ($mod, $list) = each %$href) {
28+
for my $mod (sort keys %$href) {
29+
my $list = $href->{$mod};
2930
print "\t$mod:\n";
3031
foreach my $sym (sort numerically @{$list}) {
3132
my ($symbol, $no) = split /\s+/, $sym;
32-
printf("\t\t%-25s\t%-25d\n", $symbol, $no);
33+
printf("\t\t%-25s\n", $symbol);
3334
}
3435
print "\n";
3536
}
@@ -166,7 +167,8 @@ sub collectcfiles {
166167
it uses. Each listed symbol reports the number of modules using it\n");
167168
168169
print "~"x80 , "\n";
169-
while (my ($thismod, $list) = each %MODULE) {
170+
for my $thismod (sort keys %MODULE) {
171+
my $list = $MODULE{$thismod};
170172
my %depends;
171173
$thismod =~ s/\.mod\.c/.ko/;
172174
print "\t\t\t$thismod\n";

0 commit comments

Comments
 (0)