[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] checkpatch: ignore automatically imported Linux
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] checkpatch: ignore automatically imported Linux headers |
Date: |
Tue, 9 Aug 2016 22:14:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 09/08/2016 19:38, Radim Krčmář wrote:
> 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ář <address@hidden>
> ---
> 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";
>
Queued, thanks.
Paolo