[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers |
Date: |
Tue, 9 Aug 2016 12:14:14 -0400 (EDT) |
----- Original Message -----
> From: "Radim Krčmář" <address@hidden>
> To: address@hidden
> Cc: address@hidden, address@hidden, address@hidden, address@hidden,
> address@hidden, "jan kiszka"
> <address@hidden>, address@hidden, address@hidden
> Sent: Tuesday, August 9, 2016 6:07:04 PM
> Subject: [PATCH] checkpatch: allow tabs in linux-headers
>
> 2016-08-09 08:31-0700, address@hidden:
> > Hi,
> >
> > Your series seems to have some coding style problems. See output below for
> > more information:
> >
> > Message-id: address@hidden
> > Type: series
> > Subject: [Qemu-devel] [PATCH for-2.7 0/2] intel-iommu: restrict EIM to
> > quirkless KVM
> >
> > === TEST SCRIPT BEGIN ===
> > #!/bin/bash
> >
> > BASE=base
> > n=1
> > total=$(git log --oneline $BASE.. | wc -l)
> > failed=0
> >
> > commits="$(git log --format=%H --reverse $BASE..)"
> > for c in $commits; do
> > echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s
> > $c)..."
> > if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -;
> > then
> > failed=1
> > echo
> > fi
> > n=$((n+1))
> > done
> >
> > exit $failed
> > === TEST SCRIPT END ===
> >
> > Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> > Switched to a new branch 'test'
> > e018fb0 intel-iommu: restrict EIM to quirkless KVM
> > 5ef6f2f linux-headers: update to v4.8-rc1
> >
> > === OUTPUT BEGIN ===
> > Checking PATCH 1/2: linux-headers: update to v4.8-rc1...
> > ERROR: code indent should never use tabs
> > #32: FILE: linux-headers/linux/kvm.h:885:
> > +^Iunion {$
> >
> > ERROR: code indent should never use tabs
> > #33: FILE: linux-headers/linux/kvm.h:886:
> > +^I^I__u32 pad;$
> >
> > ERROR: code indent should never use tabs
> > #34: FILE: linux-headers/linux/kvm.h:887:
> > +^I^I__u32 devid;$
> >
> > ERROR: code indent should never use tabs
> > #35: FILE: linux-headers/linux/kvm.h:888:
> > +^I};$
> >
> > ERROR: code indent should never use tabs
> > #43: FILE: linux-headers/linux/kvm.h:1034:
> > +#define KVM_MSI_VALID_DEVID^I(1U << 0)$
> >
> > ERROR: code indent should never use tabs
> > #50: FILE: linux-headers/linux/kvm.h:1040:
> > +^I__u32 devid;$
> >
> > ERROR: code indent should never use tabs
> > #51: FILE: linux-headers/linux/kvm.h:1041:
> > +^I__u8 pad[12];$
> >
> > ERROR: code indent should never use tabs
> > #59: FILE: linux-headers/linux/kvm.h:1086:
> > +^IKVM_DEV_TYPE_ARM_VGIC_ITS,$
> >
> > ERROR: code indent should never use tabs
> > #60: FILE: linux-headers/linux/kvm.h:1087:
> > +#define KVM_DEV_TYPE_ARM_VGIC_ITS^IKVM_DEV_TYPE_ARM_VGIC_ITS$
> >
> > total: 9 errors, 0 warnings, 51 lines checked
> >
> > Your patch has style problems, please review. If any of these errors
> > are false positives report them to the maintainer, see
> > CHECKPATCH in MAINTAINERS.
>
> These indentation errors are false positives.
> ---8<---
> Make scripts/checkpatch.pl accept tabs in linux-headers/, instead of
> changing scripts/update-linux-headers.sh to expand tabs when importing.
>
> Signed-off-by: Radim Krčmář <address@hidden>
> ---
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 929708721299..38232d4b25c3 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1355,7 +1355,7 @@ sub process {
> next if ($realfile !~ /\.(h|c|cpp|pl)$/);
>
> # in QEMU, no tabs are allowed
> - if ($rawline =~ /^\+.*\t/) {
> + if ($rawline =~ /^\+.*\t/ && $realfile !~ /^linux-headers\//) {
> my $herevet = "$here\n" . cat_vet($rawline) . "\n";
> ERROR("code indent should never use tabs\n" . $herevet);
> $rpt_cleaners = 1;
>
Could you do the same for standard-headers/ too?
Thanks,
Paolo
- [Qemu-devel] [PATCH for-2.7 0/2] intel-iommu: restrict EIM to quirkless KVM, Radim Krčmář, 2016/08/09
- [Qemu-devel] [PATCH 1/2] linux-headers: update to v4.8-rc1, Radim Krčmář, 2016/08/09
- [Qemu-devel] [PATCH 2/2] intel-iommu: restrict EIM to quirkless KVM, Radim Krčmář, 2016/08/09
- Re: [Qemu-devel] [PATCH for-2.7 0/2] intel-iommu: restrict EIM to quirkless KVM, no-reply, 2016/08/09
- Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers, Cornelia Huck, 2016/08/10
- Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers, Radim Krčmář, 2016/08/10
- Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers, Cornelia Huck, 2016/08/10
- Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers, no-reply, 2016/08/09