checkpatch: ignore automatically imported Linux headers
authorRadim Krčmář <rkrcmar@redhat.com>
Tue, 9 Aug 2016 17:38:41 +0000 (19:38 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Aug 2016 20:57:36 +0000 (22:57 +0200)
Linux uses tabs for indentation and checkpatch always complained about
automatically imported headers.  update-linux-headers.sh could be modified to
expand tabs, but there is no real reason to complain about any ugly code in
Linux headers, so skip all hunk-related checks.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/checkpatch.pl

index 92970872129988b71c798eb80c4d8bf502c22750..8d1813eef664e21e8572a7a103287f7ccfe73f58 100755 (executable)
@@ -1319,6 +1319,9 @@ sub process {
 # ignore non-hunk lines and lines being removed
                next if (!$hunk_line || $line =~ /^-/);
 
+# ignore files that are being periodically imported from Linux
+               next if ($realfile =~ /^(linux-headers|include\/standard-headers)\//);
+
 #trailing whitespace
                if ($line =~ /^\+.*\015/) {
                        my $herevet = "$here\n" . cat_vet($rawline) . "\n";