Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6370205pxb; Wed, 17 Feb 2021 02:39:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwavVhS3S05fD0sIorFumwKYnWzyyD8+7ie+2Z0zejV9p0LkHn+JdX0hmFqbZqV9v01C069 X-Received: by 2002:a17:907:3e1b:: with SMTP id hp27mr23644587ejc.506.1613558398786; Wed, 17 Feb 2021 02:39:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613558398; cv=none; d=google.com; s=arc-20160816; b=kB1I+vCRYBaC9HMH4w5fVO4zfq84Avbk2qYbbUoLZwCRI/znzef1Vg4Sim1o3iEro8 HS+RZXuT0DedrI5ZFsphhfcXdS07is8Cu6v1/4kI01yrcRCr4KFMdY1lNj8T2OiYAQaU 6B2xU/LRMW9F3c0bgJ8Jh0py/Tywq+eEksuUD19vOljgK/tbpQzH9AS3Lt2lRWCi5Nqi CiWHQt+raWnI6pUNc707Lpg1iQ8O1e7V8sT9jAqU9H/y4X9sxP++n3ghwMTuokBnK3fl /ifKyiknCj5RUvZftO0heERxSl1UoHB4kzNBaGTVSzTlG8lchgKJx71it7W29Z/dutgG H53Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=9vbFvdS7WDHFDwX1w17NmQg9h0qMyosiq24BHSUVlg0=; b=CTZCa+0zVkiSnQKeGBHeI2RxUGAe1KMlY1TqaF+0EcGiZX7TzDbeSBEC1EEtWgA9Nv dWyO6AjMizYW126UjzqzXxWifcznRMEGQHvzSxydp7jNs/UXl+EMj4nwUbJjRI9Cq83e W/U4ZzKIDThKQbTntgvmxrvRxWLg/P1vFL/D9WjaJ/jSMULL2rEIVMwJN2gwAvyv2WkU EAxG9o1+LZMeygMTHJlWAjrDo1XD3ADIqMCV5W5vLjU5ONBPmptZgOat3BQ25M19T98Q XkCEnIZLSFZS2UJp7xIdXCqoroiUyduDg9TQXXM9FzOBw9Lv3Xpt9jbVt7ABugjFRSep hi/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si1082328edw.240.2021.02.17.02.39.35; Wed, 17 Feb 2021 02:39:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231371AbhBQKiV (ORCPT + 99 others); Wed, 17 Feb 2021 05:38:21 -0500 Received: from smtprelay0124.hostedemail.com ([216.40.44.124]:36644 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229707AbhBQKiV (ORCPT ); Wed, 17 Feb 2021 05:38:21 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 99826837F24C; Wed, 17 Feb 2021 10:37:39 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 30,2,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:960:973:982:988:989:1260:1261:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:5007:6119:6120:6299:7652:7901:7903:8957:10010:10400:11026:11232:11473:11658:11783:11889:11914:12043:12297:12438:12555:12740:12895:13095:13138:13206:13229:13231:13439:13894:14181:14659:14721:21080:21433:21451:21611:21627:21939:30012:30054:30083:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:1:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: gold08_4914dfe2764b X-Filterd-Recvd-Size: 3759 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA; Wed, 17 Feb 2021 10:37:38 +0000 (UTC) Message-ID: <4d6856b33cc870ac655d801d066f04af6ebadcd7.camel@perches.com> Subject: Re: [PATCH RFC v3 2/3] docs: add documentation for checkpatch From: Joe Perches To: Dwaipayan Ray , Lukas Bulwahn Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel Date: Wed, 17 Feb 2021 02:37:37 -0800 In-Reply-To: References: <20210213131513.51386-1-dwaipayanray1@gmail.com> <20210213131513.51386-3-dwaipayanray1@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-02-16 at 19:48 +0530, Dwaipayan Ray wrote: > On Sun, Feb 14, 2021 at 10:27 PM Joe Perches wrote: > > On Sat, 2021-02-13 at 18:45 +0530, Dwaipayan Ray wrote: > > > Add documentation for kernel script checkpatch.pl. > > > This documentation is also parsed by checkpatch to > > > enable a verbose mode. > > > > > > The message types in checkpatch are documented with rst > > > field lists. A total of 33 checkpatch type descriptions > > > are added. > > > > Alphabetic ordering isn't that great for these entries. > > Please group them by use: > > > > whitespace/code layout style: > > SPACING, TRAILING_WHITESPACE, LINE_SPACING [] > Could I get some comment on this grouping for types: > > Allocation Style: ALLOC_ARRAY_ARGS, ALLOC_SIZEOF_STRUCT, ALLOC_WITH_MULTIPLY > > API Usage: ARCH_DEFINES, ARCH_INCLUDE_LINUX, ARRAY_SIZE, AVOID_BUG, > ????????????????????AVOID_EXTERNS, AVOID_L_PREFIX, BIT_MACRO, CONSIDER_KSTRTO > > Comment Style: BLOCK_COMMENT_STYLE, C99_COMMENTS > > Commit Message: BAD_SIGN_OFF, BAD_STABLE_ADDRESS_STYLE, COMMIT_COMMENT_SYMBOL, > ??????????????????????????????COMMIT_MESSAGE, MISSING_SIGN_OFF, > NO_AUTHOR_SIGN_OFF > > Comparison Style: ASSIGN_IN_IF, BOOL_COMPARISON, COMPARISON_TO_NULL, > ???????????????????????????????CONSTANT_COMPARISON > > Spacing & Brackets: ASSIGNMENT_CONTINUATIONS, BRACES, BRACKET_SPACE, > ??????????????????????????????????CODE_INDENT, CONCATENATED_STRING, > LINE_SPACING, > ??????????????????????????????????TRAILING_WHITESPACE > > Others: CAMELCASE, CONFIG_DESCRIPTION > > This is what I have done till now. Any suggestions would be nice and if it looks > okay I would like to send the v4 in. Looks OK. Please make sure you at least include SPACING in the spacing & brackets descriptions. It also seems like ref links to Documentation/process/coding-style.rst
(3.1 in the SPACING case) should be used more frequently. It'd be 'nice' to somehow use sortable tables with some grouping attribute for these groups, but I have no idea if that's feasible with .rst restrutured text files. Perhaps simplify the checkpatch code a bit for the --terse and --verbose output. Maybe something like: --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 869d80397f9f..07566cb3b3f8 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -292,15 +292,16 @@ GetOptions( help(0) if ($help); +die "$P: --git cannot be used with --file or --fix\n" if ($git && ($file || $fix)); +die "$P: --verbose canot be used with --terse\n" if ($verbose && $terse); + list_types(0) if ($list_types);