From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757428AbdAJQ1r (ORCPT ); Tue, 10 Jan 2017 11:27:47 -0500 Received: from smtprelay0039.hostedemail.com ([216.40.44.39]:60850 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751628AbdAJQ1q (ORCPT ); Tue, 10 Jan 2017 11:27:46 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:2902:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3871:3872:3873:3874:4321:5007:6119:7576:7903:10004:10400:10450:10455:10848:11232:11658:11914:12296:12740:12760:12895:13069:13311:13357:13439:14181:14659:14721:19904:19999:21080:21451:30012:30054:30064:30070:30079:30083: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: drug54_609df5460111b X-Filterd-Recvd-Size: 2042 Message-ID: <1484065662.12006.2.camel@perches.com> Subject: Re: [PATCH] checkpatch: don't warn on every struct without const_structs file From: Joe Perches To: Johannes Berg , Andrew Morton Cc: linux-kernel@vger.kernel.org Date: Tue, 10 Jan 2017 08:27:42 -0800 In-Reply-To: <1484060672.1014.1.camel@sipsolutions.net> References: <20170110140318.737-1-johannes@sipsolutions.net> <1484060517.2106.38.camel@perches.com> <1484060672.1014.1.camel@sipsolutions.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 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 Tue, 2017-01-10 at 16:04 +0100, Johannes Berg wrote: > On Tue, 2017-01-10 at 07:01 -0800, Joe Perches wrote: > > On Tue, 2017-01-10 at 15:03 +0100, Johannes Berg wrote: > > > From: Johannes Berg > > > > > > The script says that it won't warn: > > > "No structs that should be const will be found [...]" > > > > > > but then that doesn't work and it warns on every single struct > > > instead, since the regular expression ends up empty. Fix that > > > by checking that it's not empty first. > > > > nak. > > > > How does const_structs end up empty for you? > > I copied checkpatch elsewhere and ran it. Why do you want to copy checkpatch "someplace else"? Instead of copy, I think you should soft link it. > Regardless, the current code is utterly stupid - it prints a warning > that it won't flag any structs, and then proceeds to flag all structs. > > If you must, send a patch to abort() [whatever the perl equivalent is] > when the file can't be found, but as it is, the code is just idiotic. Maybe so. As is, your patch description is incomplete because it doesn't mention your use case.