Skip to content
Snippets Groups Projects
Select Git revision
  • 34aa0a87f83b5322bd8541cd9534179c90c580d6
  • drm-misc-templates default
  • wip/final/kci-gitlab-lava-v1
  • wip/vignesh/kci-lava-gitlab-runner
  • kci-gitlab-igt-v8
  • kci-gitlab-igt-v4
  • drm-misc-fixes-2024-10-02
  • drm-misc-next-2024-09-26
  • drm-misc-fixes-2024-09-26
  • drm-misc-next-2024-09-20
  • drm-misc-fixes-2024-09-12
  • drm-misc-fixes-2024-09-05
  • drm-misc-next-fixes-2024-09-05
  • drm-misc-fixes-2024-08-29
  • drm-misc-next-2024-08-29
  • drm-misc-next-2024-08-22
  • drm-misc-fixes-2024-08-22
  • drm-misc-next-2024-08-16
  • drm-misc-fixes-2024-08-15
  • drm-misc-next-2024-08-09
  • drm-misc-fixes-2024-08-08
  • drm-misc-next-2024-08-01
  • drm-misc-fixes-2024-08-01
  • drm-misc-next-fixes-2024-07-25
  • drm-misc-next-fixes-2024-07-19
  • drm-misc-next-fixes-2024-07-11
26 results

atombios_encoders.c

Blame
  • export_report.pl 4.55 KiB
    #!/usr/bin/env perl
    #
    # (C) Copyright IBM Corporation 2006.
    #	Released under GPL v2.
    #	Author : Ram Pai (linuxram@us.ibm.com)
    #
    # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c
    #
    
    use warnings;
    use Getopt::Std;
    use strict;
    
    sub numerically {
    	my $no1 = (split /\s+/, $a)[1];
    	my $no2 = (split /\s+/, $b)[1];
    	return $no1 <=> $no2;
    }
    
    sub alphabetically {
    	my ($module1, $value1) = @{$a};
    	my ($module2, $value2) = @{$b};
    	return $value1 <=> $value2 || $module2 cmp $module1;
    }
    
    sub print_depends_on {
    	my ($href) = @_;
    	print "\n";
    	for my $mod (sort keys %$href) {
    		my $list = $href->{$mod};
    		print "\t$mod:\n";
    		foreach my $sym (sort numerically @{$list}) {
    			my ($symbol, $no) = split /\s+/, $sym;
    			printf("\t\t%-25s\n", $symbol);
    		}
    		print "\n";
    	}
    	print "\n";
    	print "~"x80 , "\n";
    }
    
    sub usage {
            print "Usage: @_ -h -k Module.symvers  [ -o outputfile ] \n",
    	      "\t-f: treat all the non-option argument as .mod.c files. ",
    	      "Recommend using this as the last option\n",
    	      "\t-h: print detailed help\n",
    	      "\t-k: the path to Module.symvers file. By default uses ",
    	      "the file from the current directory\n",
    	      "\t-o outputfile: output the report to outputfile\n";
    	exit 0;
    }
    
    sub collectcfiles {
        my @file;
        while (<.tmp_versions/*.mod>) {
    	open my $fh, '<', $_ or die "cannot open $_: $!\n";
    	push (@file,
    	      grep s/\.ko/.mod.c/,	# change the suffix
    	      grep m/.+\.ko/,		# find the .ko path
    	      <$fh>);			# lines in opened file
        }
        chomp @file;
        return @file;
    }
    
    my (%SYMBOL, %MODULE, %opt, @allcfiles);
    
    if (not getopts('hk:o:f',\%opt) or defined $opt{'h'}) {
            usage($0);
    }