From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755924AbcH1RQC (ORCPT ); Sun, 28 Aug 2016 13:16:02 -0400 Received: from smtprelay0134.hostedemail.com ([216.40.44.134]:39147 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755375AbcH1RQB (ORCPT ); Sun, 28 Aug 2016 13:16:01 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:967:973:982:988:989:1260:1263:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2525:2553:2566:2682:2685:2693:2736:2828:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3355:3622:3834:3865:3866:3867:3868:3870:3871:3872:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:5007:6117:7903:7974:8957:8985:9025:9388:10004:10400:10848:11026:11232:11473:11658:11854:11914:12043:12555:12663:12700:12737:12740:12933:13161:13229:13439:13894:14089:14093:14096:14097:14106:14181:14659:14721:21080:21326:21433:30022:30029:30054:30064:30080: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:1,LUA_SUMMARY:none X-HE-Tag: dad36_514d491f84d14 X-Filterd-Recvd-Size: 3877 Message-ID: <1472404557.26978.84.camel@perches.com> Subject: Re: checkkpatch (in)sanity ? From: Joe Perches To: "Levin, Alexander" Cc: Sasha Levin , Greg KH , LKML , "ksummit-discuss@lists.linuxfoundation.org" Date: Sun, 28 Aug 2016 10:15:57 -0700 In-Reply-To: <20160828023807.GC19088@sasha-lappy> References: <1472330452.26978.23.camel@perches.com> <20160828005636.GB19088@sasha-lappy> <1472348579.26978.47.camel@perches.com> <20160828023807.GC19088@sasha-lappy> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu3 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 Sat, 2016-08-27 at 22:47 -0400, Levin, Alexander wrote: > Would you agree that by default we shouldn't show anything that's > not an error/defect? Not particularly, no. > That doesn't deal with newlines people add to hide the 80 character stuff, nor it > deals with the "harder to read" part. Harder to read is almost all habituation. 80 columns is simply silly when dealing with either long identifiers or many levels of indentation. One thing that 80 column limit does do is encourage shorter identifiers and fewer levels of indentation. Generally, both of those are good things. > > > By default you should only get the most critical warnings we have in the > > > kernel like missing S-O-B or corrupt patch. > > I don't think so, but if you do, add a filter for ERROR only. > I could, but the problem is the people who see the default output as "holy". Personally, I think the "my first kernel patch" beginners were overly encouraged to produce these checkpatch whitespace type changes by a couple things: o Greg KH's TuxRadar article back in 2010 http://www.tuxradar.com/content/newbies-guide-hacking-linux-kernel o The Eudyptula Challenge  http://eudyptula-challenge.org/ I don't know if the Eudyptula scripts are specific to drivers/staging and most of those beginners haven't read his email from 2015 that essentially says "don't do that" on anything other than drivers/staging. https://lists.kernelnewbies.org/pipermail/kernelnewbies/2015-July/014699.html Outreach is hard.  Those efforts were perhaps worthwhile, but has even a single productive kernel developer been produced from one of those two outreach efforts? > > > 2. A "who wrote these rules?": there seems to be a disconnect between the rules > > > checkpatch is trying to enforce and the accepted coding style enforced by > > > maintainers.  > > Name some please. > Well look at the git commit id SHA1 length thingie for example (GIT_COMMIT_ID). > checkpatch says 12 chars minimum, but as far as I can tell Linus and Greg didn't get the memo. That bit is in Documentation/SubmttingPatches 12 was Linus' length after the original 7 was too short. 12 will still be long enough for a few years yet. https://lkml.org/lkml/2010/10/28/287 > > I think almost all of it is regexes and most people > > aren't very good at those. > > > > So it wouldn't matter if it was perl or python. > > > > spatch isn't the right tool. > > > > What would you suggest instead? > This is a good topic to talk about, making checkpatch accessible to us > commoners could be useful, we just need to figure out how. I'm not sure that matters much at all. I'm sure if you tried, you could produce that "ERRORS" only patch for checkpatch. There would still be some issues categorizing the various tests at the appropriate level to taste.