From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXTyv-0001ne-Fp for qemu-devel@nongnu.org; Wed, 10 Aug 2016 09:55:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXTyp-0007iD-T6 for qemu-devel@nongnu.org; Wed, 10 Aug 2016 09:55:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXTyp-0007hu-EC for qemu-devel@nongnu.org; Wed, 10 Aug 2016 09:55:35 -0400 Date: Wed, 10 Aug 2016 15:55:28 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Message-ID: <20160810135528.GB1574@potion> References: <20160809150333.9991-1-rkrcmar@redhat.com> <20160809153149.131721.2006@ex-std-node742.prod.rhcloud.com> <20160809160703.GA10637@potion> <375557170.635610.1470759253994.JavaMail.zimbra@redhat.com> <20160810090950.21d95120.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160810090950.21d95120.cornelia.huck@de.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: Paolo Bonzini , famz@redhat.com, ehabkost@redhat.com, mst@redhat.com, qemu-devel@nongnu.org, peterx@redhat.com, jan kiszka , rth@twiddle.net, no-reply@ec2-52-6-146-230.compute-1.amazonaws.com 2016-08-10 09:09+0200, Cornelia Huck: > On Tue, 9 Aug 2016 12:14:14 -0400 (EDT) > Paolo Bonzini wrote: >> > Make scripts/checkpatch.pl accept tabs in linux-headers/, instead of >> > changing scripts/update-linux-headers.sh to expand tabs when importi= ng. >> >=20 >> > Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 >> > --- >> > 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)$/); >> > =20 >> > # in QEMU, no tabs are allowed >> > - if ($rawline =3D~ /^\+.*\t/) { >> > + if ($rawline =3D~ /^\+.*\t/ && $realfile !~ /^linux-headers\//) { >> > my $herevet =3D "$here\n" . cat_vet($rawline) . "\n"; >> > ERROR("code indent should never use tabs\n" . $herevet); >> > $rpt_cleaners =3D 1; >> >=20 >>=20 >> Could you do the same for standard-headers/ too? >=20 > 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.