Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753812AbbBKSAg (ORCPT ); Wed, 11 Feb 2015 13:00:36 -0500 Received: from smtprelay0087.hostedemail.com ([216.40.44.87]:40385 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752442AbbBKSAe (ORCPT ); Wed, 11 Feb 2015 13:00:34 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::,RULES_HIT:41:355:379:541:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2828:3138:3139:3140:3141:3142:3354:3622:3653:3865:3866:3867:3868:3871:3872:3873:3874:4250:4321:5007:6261:6299:7903:8957:9040:9163:10004:10400:10848:11232:11658:11914:12043:12517:12519:12555:12663:12740:13019:13161:13229:14093:14097: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: vein17_5bd68942cee0d X-Filterd-Recvd-Size: 3945 Message-ID: <1423677629.15343.18.camel@perches.com> Subject: checkpatch induced patches... From: Joe Perches To: Dan Carpenter , Andrew Morton Cc: devel@driverdev.osuosl.org, gmate.amit@gmail.com, gregkh@linuxfoundation.org, Bas Peters , linux-kernel@vger.kernel.org, Pushpendra Singh , manuel.schoelling@gmx.de, Sudip Mukherjee Date: Wed, 11 Feb 2015 10:00:29 -0800 In-Reply-To: <20150211105122.GN5206@mwanda> References: <1423573373-820-1-git-send-email-pushpendra.singh@smartplayin.com> <1423573373-820-2-git-send-email-pushpendra.singh@smartplayin.com> <20150210141307.GB15593@sudip-PC> <20150211083328.GJ5206@mwanda> <1423647637.15343.16.camel@perches.com> <20150211105122.GN5206@mwanda> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.7-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 Content-Length: 2778 Lines: 90 On Wed, 2015-02-11 at 13:51 +0300, Dan Carpenter wrote: > On Wed, Feb 11, 2015 at 01:40:37AM -0800, Joe Perches wrote: > > On Wed, 2015-02-11 at 11:33 +0300, Dan Carpenter wrote: > > > You can't fight checkpatch.pl. > > > > Sure you can, Ignore it whenever appropriate. > > People will just keep sending patches until something gets merged. > > It's rude to ignore patches and it's useless because people will just > send another email asking you "have you received my patch yet?". It > just creates a bigger fight. > Applying mediocre checkpatch cleanups takes less time and energy than > constantly fighting. Mediocre cleanup patches that fall into the "not satisfactory, poor, inferior" category shouldn't be applied. > It's easiest to not fight over stupid stuff and > just apply the patches. Plus it makes the patch senders happy and > that creates a happier community. The primary thing I'd like to see stopped is the use of checkpatch to satisfy some CS assignment. Have any of those submitters ever gone on to produce more thorough patches? I'm half tempted to submit some patch like this to make it difficult to use checkpatch on files outside of drivers/staging. o Only allow checkpatch to be used with the -f/--file option for drivers/staging/ o Add an undocumented --force command line option o Make --strict the default for drivers/staging --- scripts/checkpatch.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3642b0d..70f1047 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -25,6 +25,7 @@ my $tst_only; my $emacs = 0; my $terse = 0; my $file = 0; +my $force = 0; my $check = 0; my $check_orig = 0; my $summary = 1; @@ -130,6 +131,7 @@ GetOptions( 'emacs!' => \$emacs, 'terse!' => \$terse, 'f|file!' => \$file, + 'force!' => \$force, 'subjective!' => \$check, 'strict!' => \$check, 'ignore=s' => \@ignore, @@ -674,6 +676,10 @@ my $fixlinenr = -1; my $vname; for my $filename (@ARGV) { my $FILE; + if (!$force && $file && $filename !~ m@^drivers/staging/@) { + warn "$P: checking '$filename' is not supported\n"; + next; + } if ($file) { open($FILE, '-|', "diff -u /dev/null $filename") || die "$P: $filename: diff failed - $!\n"; @@ -2062,7 +2068,7 @@ sub process { } if ($found_file) { - if ($realfile =~ m@^(drivers/net/|net/)@) { + if ($realfile =~ m@^(?:drivers/net/|net/|drivers/staging/)@) { $check = 1; } else { $check = $check_orig; -- 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/