Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1282549imm; Thu, 6 Sep 2018 19:52:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYH5jf6rhWvLSZxglnKhCOGlmaMcv632B86njM0b9g/c3H9dOZRbzjrdHUDGUaCyjcEGPYr X-Received: by 2002:a62:e218:: with SMTP id a24-v6mr6067203pfi.75.1536288733450; Thu, 06 Sep 2018 19:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536288733; cv=none; d=google.com; s=arc-20160816; b=fxLYyH841Vk2auuq/qjifJX4wc8f5PjFMzgVCF+9I6n62iPBG7cIPbNfOfqZ0Mb1jb nq66O0lOQxgw7mZLLv0DiashsyDP/c2jGImctXhic2Wz9C9A9CJljIVLG848V/CcZwHK uq1JHgReZWvhmT3PWQsWsNehrk6wUbGnUVD4zJG0wa7UBIrh0QrUDu2aj7qdqUYycTfT FcOcAsPsNgG8EULmjiEUrp6LJZFjt74QNCuW6CZaVXl/IuFrm1HxzmhlxI08ucLqCOK9 KfrpugbBrJg2lMTqE6BYiywqO80He03d2d+856E9wfVT1EDBX+jS2cwy1PqO6jcTaBHW 1ukg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=Z4al/qSRXVFP7DeHQDMulP02izjaVDeM8aA6SZJtZuE=; b=oFH10pDERvvYiWZ5KThIZWzGdav5Ytir4sHttCZlWsbyWcFixRItoAlcVi4kkmQaGz dMQ1F8F1E7X5zj2S1B04PiEijus4GHQIUgyajIzpTSzbKasW0+WjWK4hFaElU87XRM3M GX+IonyXAnslM3OF+fiuMH9h+rEJt7KplQOogvSipDSrnyaPbVUdU/fZ5JHdM2z+Y2zP JGYkFv+GZCgpgBDZuRWDEqPsw/bdGK26IF0qgMFFbfGBhjp5UoqXw3Z1HrxA3l5GTv+E Ye3UDR0fxXHpRzO/zoXpPkaDcm+SzvBXzp63UVa10dJ+/yAR8w9lhy1qKLjxCOzRha6a Acng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c33-v6si6892649pgl.23.2018.09.06.19.51.51; Thu, 06 Sep 2018 19:52:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729011AbeIGF2R (ORCPT + 99 others); Fri, 7 Sep 2018 01:28:17 -0400 Received: from smtprelay0139.hostedemail.com ([216.40.44.139]:50539 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727677AbeIGF2Q (ORCPT ); Fri, 7 Sep 2018 01:28:16 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 93E62181D337B; Fri, 7 Sep 2018 00:50:06 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 30,2,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:967:973:982:988:989:1260:1263:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2197:2199:2393:2525:2553:2559:2563:2682:2685:2828:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3622:3653:3770:3865:3868:3871:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:5007:6119:6120:6742:7901:7903:7904:7996:9025:9121:10004:10400:10848:11233:11257:11658:11914:12043:12262:12296:12438:12555:12679:12740:12760:12783:12895:12986:13069:13311:13357:13439:13846:14181:14659:14721:14849:21080:21221:21222:21365:21451:21505:21627:21796:30036:30054:30055:30060:30091,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:31,LUA_SUMMARY:none X-HE-Tag: stamp51_3aac1820f3a56 X-Filterd-Recvd-Size: 3552 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Fri, 7 Sep 2018 00:50:03 +0000 (UTC) Message-ID: <5137f85388e26ea1ed46b34901b0f18540aee7cb.camel@perches.com> Subject: Re: [PATCH v13 11/13] platform/x86: Intel SGX driver From: Joe Perches To: Miguel Ojeda , Jarkko Sakkinen Cc: Andy Shevchenko , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Platform Driver , Dave Hansen , sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, linux-sgx@vger.kernel.org, serge.ayoun@intel.com, shay.katz-zamir@intel.com, "Siddha, Suresh B" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Darren Hart , Andy Shevchenko , Herbert Xu , Eric Biggers , Linux Kernel Mailing List Date: Thu, 06 Sep 2018 17:50:01 -0700 In-Reply-To: References: <20180827185507.17087-1-jarkko.sakkinen@linux.intel.com> <20180827185507.17087-12-jarkko.sakkinen@linux.intel.com> <20180905173355.GE11368@linux.intel.com> <20180906092100.GA27302@linux.intel.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-09-06 at 19:35 +0200, Miguel Ojeda wrote: > > Which one is right and why the kernel tree is polluted with C99-headers > > when they do not pass checkpatch.pl? checkpatch ignores c99 headers since 2016. $ git log --stat -p -1 dadf680de3c2eb4cba9840619991eda0cfe98778 commit dadf680de3c2eb4cba9840619991eda0cfe98778 Author: Joe Perches Date: Tue Aug 2 14:04:33 2016 -0700 checkpatch: allow c99 style // comments Sanitise the lines that contain c99 comments so that the error doesn't get emitted. Link: http://lkml.kernel.org/r/d4d22c34ad7bcc1bceb52f0742f76b7a6d585235.1468368420.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a4476b61e93f..79273003d5e7 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -55,6 +55,7 @@ my $spelling_file = "$D/spelling.txt"; my $codespell = 0; my $codespellfile = "/usr/share/codespell/dictionary.txt"; my $color = 1; +my $allow_c99_comments = 1; sub help { my ($exitcode) = @_; @@ -1144,6 +1145,11 @@ sub sanitise_line { $res =~ s@(\#\s*(?:error|warning)\s+).*@$1$clean@; } + if ($allow_c99_comments && $res =~ m@(//.*$)@) { + my $match = $1; + $res =~ s/\Q$match\E/"$;" x length($match)/e; + } + return $res; }