Skip to content
Snippets Groups Projects
Select Git revision
  • b51c05a331ff46d2b29e4007df938ec2dbbadfde
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

am3517-evm.dts

Blame
  • headers_check.pl 3.68 KiB
    #!/usr/bin/perl -w
    #
    # headers_check.pl execute a number of trivial consistency checks
    #
    # Usage: headers_check.pl dir arch [files...]
    # dir:   dir to look for included files
    # arch:  architecture
    # files: list of files to check
    #
    # The script reads the supplied files line by line and:
    #
    # 1) for each include statement it checks if the
    #    included file actually exists.
    #    Only include files located in asm* and linux* are checked.
    #    The rest are assumed to be system include files.
    #
    # 2) It is checked that prototypes does not use "extern"
    #
    # 3) Check for leaked CONFIG_ symbols
    
    use strict;
    use File::Basename;
    
    my ($dir, $arch, @files) = @ARGV;
    
    my $ret = 0;
    my $line;
    my $lineno = 0;
    my $filename;
    
    foreach my $file (@files) {
    	$filename = $file;
    
    	open(my $fh, '<', $filename)
    		or die "$filename: $!\n";
    	$lineno = 0;
    	while ($line = <$fh>) {
    		$lineno++;
    		&check_include();
    		&check_asm_types();
    		&check_sizetypes();
    		&check_declarations();
    		# Dropped for now. Too much noise &check_config();
    	}
    	close $fh;
    }
    exit $ret;
    
    sub check_include
    {
    	if ($line =~ m/^\s*#\s*include\s+<((asm|linux).*)>/) {
    		my $inc = $1;
    		my $found;
    		$found = stat($dir . "/" . $inc);
    		if (!$found) {
    			$inc =~ s#asm/#asm-$arch/#;
    			$found = stat($dir . "/" . $inc);
    		}
    		if (!$found) {
    			printf STDERR "$filename:$lineno: included file '$inc' is not exported\n";
    			$ret = 1;
    		}
    	}
    }
    
    sub check_declarations
    {
    	# soundcard.h is what it is
    	if ($line =~ m/^void seqbuf_dump\(void\);/) {
    		return;