From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXA4C-0002NU-KO for qemu-devel@nongnu.org; Tue, 09 Aug 2016 12:39:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXA49-00056H-DB for qemu-devel@nongnu.org; Tue, 09 Aug 2016 12:39:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXA49-000566-7T for qemu-devel@nongnu.org; Tue, 09 Aug 2016 12:39:45 -0400 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> <20160809163750.GA11647@potion> From: Paolo Bonzini Message-ID: <4ba6911e-08d5-bbd2-2125-eb3213a4df77@redhat.com> Date: Tue, 9 Aug 2016 18:39:39 +0200 MIME-Version: 1.0 In-Reply-To: <20160809163750.GA11647@potion> Content-Type: text/plain; charset=utf-8 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: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= 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 On 09/08/2016 18:37, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: >>> Make scripts/checkpatch.pl accept tabs in linux-headers/, instead of >>> changing scripts/update-linux-headers.sh to expand tabs when importin= g. >>> >>> 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; >>> >> >> Could you do the same for standard-headers/ too? >=20 > Sure, and when we are at it ... are *.pl files going to be reindented? >=20 > 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. I've sent a patch series to fix the most obvious issues in automated checkpatch email, it skips the tab check on imported Perl scripts. Paolo