From: Joe Perches <joe@perches.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: devel@driverdev.osuosl.org, gmate.amit@gmail.com,
gregkh@linuxfoundation.org, Bas Peters <baspeters93@gmail.com>,
linux-kernel@vger.kernel.org,
Pushpendra Singh <pushpendra.singh@smartplayin.com>,
manuel.schoelling@gmx.de,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: checkpatch induced patches...
Date: Wed, 11 Feb 2015 10:00:29 -0800 [thread overview]
Message-ID: <1423677629.15343.18.camel@perches.com> (raw)
In-Reply-To: <20150211105122.GN5206@mwanda>
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;
next prev parent reply other threads:[~2015-02-11 18:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 13:02 [PATCH 1/6] staging: rt8188eu: hal: removed space before ',' Pushpendra Singh
2015-02-10 13:02 ` [PATCH 2/6] staging: rtl8188eu: hal: removed code indent error Pushpendra Singh
2015-02-10 14:13 ` Sudip Mukherjee
2015-02-10 14:27 ` Bas Peters
2015-02-10 14:48 ` Sudip Mukherjee
2015-02-11 8:33 ` Dan Carpenter
2015-02-11 9:40 ` Joe Perches
2015-02-11 10:51 ` Dan Carpenter
2015-02-11 18:00 ` Joe Perches [this message]
2015-02-11 18:36 ` checkpatch induced patches Dan Carpenter
2015-02-11 20:02 ` Richard Weinberger
2015-02-11 20:20 ` Joe Perches
2015-02-11 20:24 ` Pavel Machek
2015-02-11 20:43 ` Joe Perches
2015-02-11 22:43 ` Dan Carpenter
2015-02-11 22:46 ` Richard Weinberger
2015-02-11 23:01 ` Joe Perches
2015-02-12 8:03 ` Sudip Mukherjee
2015-02-12 16:44 ` Kalle Valo
2015-02-10 22:25 ` [PATCH 2/6] staging: rtl8188eu: hal: removed code indent error Greg KH
2015-02-10 13:02 ` [PATCH 3/6] staging: rtl8188eu: hal: removed unnecessary braces Pushpendra Singh
2015-02-10 13:02 ` [PATCH 4/6] staging: rtl8188eu: hal: added blank line after declarations Pushpendra Singh
2015-02-10 13:02 ` [PATCH 5/6] staging: rtl8188eu: hal: removed spaces at start of line Pushpendra Singh
2015-02-10 13:02 ` [PATCH 6/6] staging: rtl8188eu: hal: removed unnecessary parentheses Pushpendra Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423677629.15343.18.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=baspeters93@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gmate.amit@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manuel.schoelling@gmx.de \
--cc=pushpendra.singh@smartplayin.com \
--cc=sudipm.mukherjee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox