From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXA2Q-0008R1-VM for qemu-devel@nongnu.org; Tue, 09 Aug 2016 12:37:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXA2N-0004Vg-Ps for qemu-devel@nongnu.org; Tue, 09 Aug 2016 12:37:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXA2N-0004Vc-Jz for qemu-devel@nongnu.org; Tue, 09 Aug 2016 12:37:55 -0400 Date: Tue, 9 Aug 2016 18:37:51 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Message-ID: <20160809163750.GA11647@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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <375557170.635610.1470759253994.JavaMail.zimbra@redhat.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: Paolo Bonzini Cc: no-reply@ec2-52-6-146-230.compute-1.amazonaws.com, famz@redhat.com, ehabkost@redhat.com, mst@redhat.com, qemu-devel@nongnu.org, peterx@redhat.com, jan kiszka , rth@twiddle.net >> Make scripts/checkpatch.pl accept tabs in linux-headers/, instead of >> changing scripts/update-linux-headers.sh to expand tabs when importing= . >>=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? Sure, and when we are at it ... are *.pl files going to be reindented? e.g. checkpatch.pl uses tabs consistently, get_maintainer.pl is a horrible mix of tabs and spaces [1], and clean-header-guards.pl uses 4 spaces for an indent. --- 1: get_maintainer.pl assumes that tab is 8 spaces and uses 1 tab for every two consecutive indents and 4 spaces for indents that cannot be tabified, then tops the ugliness by also using 8 and 12 spaces for 2 and 3 indents, respectively.