From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Alasdair G Kergon <agk@redhat.com>,
dm-devel@redhat.com
Subject: Re: [PATCH] Drop 80-character limit in checkpatch.pl
Date: Tue, 15 Dec 2009 23:26:34 +0100 [thread overview]
Message-ID: <200912152326.34728.bzolnier@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0912151656010.29183@hs20-bc2-1.build.redhat.com>
On Tuesday 15 December 2009 10:57:49 pm Mikulas Patocka wrote:
> But some maintainers take output of the script checkpatch.pl dogmatically,
> requiring that every new work must pass the script without a warning. This is
> counterproductive --- if I write a driver and I will be doing most maintenance
> work on it in the future, it is viable that the driver is formatted in such
> a way that is best editable for me, not for anyone else. And as shown in example
> (1), this 80-column requirement makes even simple changes much harder.
It has been agreed in the past that 80-column warnings shouldn't result
automatically in the rejection of the new hardware support so the above
argumentation is a bit weak.
> So: I am submitting this patch for the checkpatch.pl script.
>
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Having this limitation makes people at least think about designing their
code properly and making it more compact.
If you don't want to see such warnings just apply the following patch that
I've been keeping locally (it helped me to work on staging drivers):
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] checkpatch.pl: add option to disable 80 column limit check
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
scripts/checkpatch.pl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: b/scripts/checkpatch.pl
===================================================================
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -17,6 +17,7 @@ use Getopt::Long qw(:config no_auto_abbr
my $quiet = 0;
my $tree = 1;
my $chk_signoff = 1;
+my $chk_cl = 1;
my $chk_patch = 1;
my $tst_only;
my $emacs = 0;
@@ -41,6 +42,7 @@ Options:
-q, --quiet quiet
--no-tree run without a kernel tree
--no-signoff do not check for 'Signed-off-by' line
+ --no-cl do not apply 80 column limit
--patch treat FILE as patchfile (default)
--emacs emacs compile window format
--terse one line per report
@@ -67,6 +69,7 @@ GetOptions(
'q|quiet+' => \$quiet,
'tree!' => \$tree,
'signoff!' => \$chk_signoff,
+ 'cl!' => \$chk_cl,
'patch!' => \$chk_patch,
'emacs!' => \$emacs,
'terse!' => \$terse,
@@ -1365,7 +1368,7 @@ sub process {
next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/);
#80 column limit
- if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
+ if ($chk_cl && $line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
$rawline !~ /^.\s*\*\s*\@$Ident\s/ &&
$line !~ /^\+\s*printk\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ &&
$length > 80)
next prev parent reply other threads:[~2009-12-15 22:28 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 21:57 [PATCH] Drop 80-character limit in checkpatch.pl Mikulas Patocka
2009-12-15 22:26 ` Bartlomiej Zolnierkiewicz [this message]
2009-12-17 9:31 ` Américo Wang
2009-12-17 15:14 ` Linus Torvalds
2009-12-17 15:18 ` Bartlomiej Zolnierkiewicz
2009-12-17 15:37 ` Linus Torvalds
2009-12-17 16:08 ` Bartlomiej Zolnierkiewicz
2009-12-17 16:21 ` Linus Torvalds
2009-12-17 16:30 ` Janakiram Sistla
2009-12-17 18:05 ` Andi Kleen
2009-12-18 13:31 ` Pádraig Brady
2009-12-18 16:32 ` Mikulas Patocka
2009-12-18 22:33 ` Krzysztof Halasa
2009-12-18 13:04 ` Jiri Kosina
2009-12-18 13:55 ` Bartlomiej Zolnierkiewicz
2009-12-18 14:39 ` Krzysztof Halasa
2009-12-27 17:15 ` Jon Smirl
2009-12-21 6:32 ` Paul Mundt
2009-12-22 15:10 ` Jiri Kosina
2009-12-16 10:58 ` Andi Kleen
2009-12-16 19:59 ` Alex Chiang
2009-12-17 6:12 ` Paul Mundt
2009-12-17 8:34 ` Krzysztof Halasa
2009-12-17 23:29 ` Mikulas Patocka
2009-12-17 23:35 ` Al Viro
2009-12-18 4:29 ` Valdis.Kletnieks
2009-12-18 5:12 ` [PATCH] scripts/checkpatch.pl: Change long line warning to 105 chars Joe Perches
2009-12-18 5:57 ` Paul Mundt
2009-12-18 17:43 ` Linus Torvalds
2009-12-18 17:54 ` Joe Perches
2009-12-18 18:41 ` Andi Kleen
2009-12-18 14:37 ` Krzysztof Halasa
2009-12-18 15:12 ` [dm-devel] " Alasdair G Kergon
2009-12-18 16:58 ` Randy Dunlap
2009-12-18 17:12 ` Mikulas Patocka
2009-12-18 22:36 ` Krzysztof Halasa
2009-12-18 17:31 ` Joe Perches
2009-12-18 14:28 ` [PATCH] Drop 80-character limit in checkpatch.pl Krzysztof Halasa
2009-12-18 14:52 ` kevin granade
2009-12-18 16:43 ` Mikulas Patocka
2009-12-18 16:50 ` Linus Torvalds
2009-12-18 17:09 ` Mikulas Patocka
2009-12-18 17:28 ` Linus Torvalds
2009-12-18 21:15 ` kevin granade
2009-12-18 15:11 ` Bartlomiej Zolnierkiewicz
2009-12-17 22:37 ` Mikulas Patocka
2009-12-17 23:12 ` Paul Mundt
2009-12-17 23:33 ` Mikulas Patocka
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=200912152326.34728.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=torvalds@linux-foundation.org \
/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