All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, thuth@redhat.com, famz@redhat.com,
	armbru@redhat.com
Subject: [Qemu-devel] [PATCH] checkpatch: ignore automatically imported Linux headers
Date: Tue,  9 Aug 2016 19:38:41 +0200	[thread overview]
Message-ID: <20160809173841.716-1-rkrcmar@redhat.com> (raw)

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>
---
 Line offset of the diff assumes that Paolo's "[PATCH 0/3] checkpatch tweaks"
 is applied first.  Context remains the same, though.

 scripts/checkpatch.pl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 0f9ae512ae55..873a50292442 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1312,6 +1312,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";
-- 
2.9.2

             reply	other threads:[~2016-08-09 17:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09 17:38 Radim Krčmář [this message]
2016-08-09 18:14 ` [Qemu-devel] [PATCH] checkpatch: ignore automatically imported Linux headers no-reply
2016-08-09 20:14 ` Paolo Bonzini
2016-08-10 14:03 ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160809173841.716-1-rkrcmar@redhat.com \
    --to=rkrcmar@redhat.com \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.