Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753327AbbGIK34 (ORCPT ); Thu, 9 Jul 2015 06:29:56 -0400 Received: from smtprelay0077.hostedemail.com ([216.40.44.77]:43118 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750866AbbGIK3s (ORCPT ); Thu, 9 Jul 2015 06:29:48 -0400 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:2553:2559:2562:2828:2911:3138:3139:3140:3141:3142:3353:3622:3653:3865:3866:3867:3868:3870:3871:3872:4321:4425:5007:6119:6261:6742:10004:10400:10848:11026:11232:11473:11658:11914:12294:12296:12517:12519:12555:12740:13069:13311:13357:13869:21080,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: linen82_72379af96670a X-Filterd-Recvd-Size: 3101 Message-ID: <1436437783.2682.104.camel@perches.com> Subject: Re: kdbus: to merge or not to merge? From: Joe Perches To: Geert Uytterhoeven Cc: Pavel Machek , Greg KH , Andy Lutomirski , Linus Torvalds , "linux-kernel@vger.kernel.org" , David Herrmann , Djalal Harouni , Havoc Pennington , "Eric W. Biederman" , One Thousand Gnomes , Tom Gundersen , Daniel Mack Date: Thu, 09 Jul 2015 03:29:43 -0700 In-Reply-To: References: <20150623064140.GA18300@kroah.com> <20150708135402.GA13432@amd> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 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 Content-Length: 1888 Lines: 51 On Thu, 2015-07-09 at 10:39 +0200, Geert Uytterhoeven wrote: > On Wed, Jul 8, 2015 at 3:54 PM, Pavel Machek wrote: > > Apparently, new tools are needed in the community, as normal review > > comments did not stop drivers/android/binder.c merge. > > > > For example binder_transaction does not exactly look like a kernel > > code, "TODO: fput" does not really invoke confidence, and amount of > > BUG_ON()s is quite amazing... > > Amazingly, checkpatch (without --strict) only complains about long lines. > > Seems like the test for "BUG" is (and always has been) commented out... Maybe (requires --strict when scanning files) --- scripts/checkpatch.pl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 90e1edc..11c8186 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3439,13 +3439,15 @@ sub process { } } -# # no BUG() or BUG_ON() -# if ($line =~ /\b(BUG|BUG_ON)\b/) { -# print "Try to use WARN_ON & Recovery code rather than BUG() or BUG_ON()\n"; -# print "$herecurr"; -# $clean = 0; -# } +# avoid BUG() or BUG_ON() + if ($line =~ /\b(?:BUG|BUG_ON)\b/) { + my $msg_type = \&WARN; + $msg_type = \&CHK if ($file); + &{$msg_type}("AVOID_BUG", + "Avoid crashing the kernel - Try using WARN_ON & Recovery code rather than BUG() or BUG_ON()\n" . $herecurr); + } +# avoid LINUX_VERSION_CODE if ($line =~ /\bLINUX_VERSION_CODE\b/) { WARN("LINUX_VERSION_CODE", "LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged\n" . $herecurr); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/