2016-08-10 09:09+0200, Cornelia Huck: > On Tue, 9 Aug 2016 12:14:14 -0400 (EDT) > Paolo Bonzini <pbonz...@redhat.com> wrote: >> > 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ář <rkrc...@redhat.com> >> > --- >> > 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? > > I think it would be better to not apply any qemu coding style checks to > a headers update. Something like 'check if this contains header updates > _only_' would make more sense, but that is beyond my nonexisting perl > skills...
I have posted another vesion that does not check for any code style in hunks that modify linux-headers and include/standard-headers, http://lists.nongnu.org/archive/html/qemu-devel/2016-08/msg01824.html We still want to check header-only updates in other headers ... Your condition would draw attention to linux header updates that also touch other files, but I think that a diffstat is enough. The script would need some preprocessing to know that only headers are modified or buffering of errors until the script knows that only headers were modified; neither is hard, but the added complexity is not compensated by usefulness, IMO.