aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2016-08-09 19:38:41 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-08-09 22:57:36 +0200
commit93bf13c6df4d6fd1a889cae890a9570eb00eb8e5 (patch)
tree86c1dce0733352c02f663b36e67dd85c249c05e1
parent2368635d3943294c672a62abd60a233aca708982 (diff)
checkpatch: ignore automatically imported Linux headers
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>
-rwxr-xr-xscripts/checkpatch.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9297087212..8d1813eef6 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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";