From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751518AbcBPA4e (ORCPT ); Mon, 15 Feb 2016 19:56:34 -0500 Received: from smtprelay0083.hostedemail.com ([216.40.44.83]:34504 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751016AbcBPA4c (ORCPT ); Mon, 15 Feb 2016 19:56:32 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3872:3874:4321:5007:6261:8957:9040:10004:10400:10848:11026:11232:11658:11783:11914:12043:12295:12296:12438:12517:12519:12663:12740:13069:13311:13357:13894:14659:21067:21080:21324:30012:30054:30056: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: home48_1bcb0cc2c712f X-Filterd-Recvd-Size: 1676 Message-ID: <1455584189.4046.28.camel@perches.com> Subject: Re: checkpatch falsepositives in Lustre code From: Joe Perches To: Oleg Drokin , Andy Whitcroft Cc: LKML Date: Mon, 15 Feb 2016 16:56:29 -0800 In-Reply-To: <1E5E2198-2E5C-4B6F-AAA5-C28E0A776714@linuxhacker.ru> References: <1E5E2198-2E5C-4B6F-AAA5-C28E0A776714@linuxhacker.ru> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.4-0ubuntu1 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 Mon, 2016-02-15 at 18:49 -0500, Oleg Drokin wrote: > Hello! > > >    As I am going over Lustre to clean up the code style, I noticed this bunch below. > >    Those all are function definitions, though I guess it might have been foiled by >    return type on the previous line? >    Now sure if anything could be done about this. > >    Thanks. > > ERROR: that open brace { should be on the previous line  > #2098: FILE: drivers/staging/lustre/lustre/libcfs/hash.c:1358: > +cfs_ash_for_each_enter(struct cfs_hash *hs) > +{ [etc...] Yeah, that's a defect of some type. I'm not sure if it's really possible to handle it well though. Maybe there could be a test added for something like "^[\+ ](?:$Declare\s*|DeclareMisordered\s*)?\$Ident\(" to find what looks like function declarations in the first column to avoid some of these false positives. Andy?