From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933445AbcIVKmY (ORCPT ); Thu, 22 Sep 2016 06:42:24 -0400 Received: from smtprelay0125.hostedemail.com ([216.40.44.125]:54691 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751187AbcIVKmV (ORCPT ); Thu, 22 Sep 2016 06:42:21 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2691:2693:2828:2911:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:4425:5007:6742:7903:8784:10004:10400:10450:10455:10848:11026:11232:11473:11658:11914:12043:12050:12438:12555:12740:13095:13161:13181:13229:13439:13894:14039:14093:14096:14097:14181:14659:14721:19904:19999:21080:21324:21433:21434:21451:30054:30070:30085:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:4,LUA_SUMMARY:none X-HE-Tag: snow70_87bb727f7423a X-Filterd-Recvd-Size: 3853 Message-ID: <1474540930.8253.9.camel@perches.com> Subject: Re: "CodingStyle: Clarify and complete chapter 7" in docs-next From: Joe Perches To: Jean Delvare Cc: Julia Lawall , Al Viro , Ilya Dryomov , Andy Whitcroft , Linus Torvalds , Jonathan Corbet , Ceph Development , Alex Elder , Sage Weil , LKML , kernel-janitors@vger.kernel.org, Andrew Morton , linux-doc@vger.kernel.org Date: Thu, 22 Sep 2016 03:42:10 -0700 In-Reply-To: <20160922112407.47da9393@endymion> References: <20160920001159.GM2356@ZenIV.linux.org.uk> <1474339566.1954.25.camel@perches.com> <1474353123.1954.28.camel@perches.com> <20160922112407.47da9393@endymion> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.21.91-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-09-22 at 11:24 +0200, Jean Delvare wrote: [] > > The seriousness with which some beginners take these message > > types though is troublesome, [] > You need to think in terms of actual use cases. Who uses checkpatch and > why? I think there are 3 groups of users: > * Beginners. They won't run the script by themselves, instead they will >   submit a patch which infringes a lot of coding style rules, and the >   maintainer will point them to checkpatch and ask for a resubmission >   which makes checkpatch happy. Being beginners, they can only rely on >   the script itself to only report things which need to be fixed, by >   default. > * Experienced developers. Who simply want to make sure they did not >   overlook anything before they post their work for review. They have >   the knowledge to decide if they want to ignore some of the warnings. > * People with too much spare time, looking for anything they could >   "contribute" to the kernel. They will use --subjective and piss off >   every maintainer they can find. I think you overlook the category of a beginner submitting "my first kernel patch" which is a "coding style" defect of some type. The Eudyptula and Outreachy programs seem to encourage these sorts of patches. This is where "scripts/checkpatch.pl -f " is most used. I believe adding the --force option might be useful to restrict cleanup-style-only patches outside of staging. There's nothing wrong with cleanup style patches, it can be good introduction to compiler/config tool & kernel setup. > I would rather suggest: > > ERROR -> MUST_FIX > WARNING -> SHOULD_FIX > CHECK -> MAY_FIX MUST is much stronger language than I would prefer. There are still about a quarter million ERRORs just for spacing issues in the kernel tree. Here are the top 10 ERROR checkpatch messages treewide as of a few days ago, $ grep ERROR checkpatch.short_sorted_20160917 268308 ERROR:SPACING 37340 ERROR:CODE_INDENT 27678 ERROR:TRAILING_WHITESPACE 21024 ERROR:COMPLEX_MACRO 14048 ERROR:POINTER_LOCATION 12207 ERROR:TRAILING_STATEMENTS 11079 ERROR:OPEN_BRACE 6802 ERROR:ASSIGN_IN_IF 3940 ERROR:RETURN_PARENTHESES 2322 ERROR:NON_OCTAL_PERMISSIONS Maybe there could be some better classifications of the various messages. But there are about two million checkpatch messages overall in the kernel tree. That's a lot.