From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753809AbaCJSs5 (ORCPT ); Mon, 10 Mar 2014 14:48:57 -0400 Received: from smtprelay0225.hostedemail.com ([216.40.44.225]:38206 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752828AbaCJSsz (ORCPT ); Mon, 10 Mar 2014 14:48:55 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1261:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2736:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3872:3873:3874:4250:4321:4605:5007:7652:7903:8825:10004:10226:10400:10848:11026:11232:11658:11914:12043:12517:12519:12555:12679:12740:13019:13069:13095:13311:13357:13618,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 X-HE-Tag: hole28_30583accabb37 X-Filterd-Recvd-Size: 3128 Message-ID: <1394477330.24244.34.camel@joe-AO722> Subject: Re: Treewide frequency of various checkpatch messages From: Joe Perches To: Greg KH Cc: Dan Carpenter , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, apw@canonical.com, devel@linuxdriverproject.org, Andrew Morton , David Miller Date: Mon, 10 Mar 2014 11:48:50 -0700 In-Reply-To: <20140310165046.GA12687@kroah.com> References: <1394104358-23438-1-git-send-email-kys@microsoft.com> <1394104390-23477-1-git-send-email-kys@microsoft.com> <20140306.142919.763823800315842610.davem@davemloft.net> <1394148520.16156.8.camel@joe-AO722> <20140307075247.GA29018@mwanda> <1394184637.16156.58.camel@joe-AO722> <1394467346.24244.14.camel@joe-AO722> <20140310165046.GA12687@kroah.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.8.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2014-03-10 at 09:50 -0700, Greg KH wrote: > On Mon, Mar 10, 2014 at 09:02:26AM -0700, Joe Perches wrote: > > On Fri, 2014-03-07 at 01:30 -0800, Joe Perches wrote: > > > On Fri, 2014-03-07 at 10:54 +0300, Dan Carpenter wrote: > > (a question about a new message warning of a missing > > blank line between variable declaration blocks and > > code in a function) > > > > How many warnings does this generate does this generate when you run it > > > > across the whole tree? > > > A lot. > > > > Turns out it's 20,210 and it's the 14th > > most common checkpatch message type. > > > > 14 20210 WARNING:SPACING: Missing a blank line after declarations > > I think it's still worthwhile to clean up. Maybe. Luckily, I don't have to deal with the patches that would be generated by this message. Some people are going to view patches for this as useless noise. Couple of things: It's kind of interesting how the messages vary by subsystem. Let me know if you want any breakdowns. And there are a small number of false positives for this "Missing a blank line" test with declarations like: typedef *foo; DECLARE_BITMAP(foo); __DECL_REG(foo); LIST_HEAD(foo); So there could be a minor improvement to the test. I looked at some of the results using: This sort of match stands out a bit: ---> arch/tile/lib/spinlock_32.c:68: { u32 iterations = 0; while (arch_spin_is_locked(lock)) delay_backoff(iterations++); } Instances like this may be fine, but adding blank lines to very short functions with a single declaration just adds to the overall line count. I've no strong opinion of the need to write code like: { u32 iterations = 0; while (arch_spin_is_locked(lock)) delay_backoff(iterations++); }