From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>,
linux-kernel@vger.kernel.org,
Pavel Emelyanov <xemul@parallels.com>,
Serge Hallyn <serge.hallyn@canonical.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Kees Cook <keescook@chromium.org>, Tejun Heo <tj@kernel.org>,
Andrew Vagin <avagin@openvz.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
Andi Kleen <andi@firstfloor.org>,
KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Glauber Costa <glommer@parallels.com>,
Matt Helsley <matthltc@us.ibm.com>,
Pekka Enberg <penberg@kernel.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
Vasiliy Kulikov <segoon@openwall.com>,
Valdis.Kletnieks@vt.edu
Subject: [PATCH] SubmittingPatches: Increase the line length limit from 80 to 100 colums
Date: Fri, 3 Feb 2012 11:07:43 +0100 [thread overview]
Message-ID: <20120203100743.GA3334@elte.hu> (raw)
In-Reply-To: <20120203095227.GA13162@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> > If we want to increase the standard to (say) 96 cols then
> > fine, I'd be happy with that. But until we do that we
> > should not create such a gruesome mess for those who use 80
> > cols.
>
> The kernel has *already* become a gruesome mess for 80 col
> users long ago. That was the main reason why I stopped using
> 80 col terminals two years ago ...
>
> So lets stop the pretense.
in other words:
--------------->
[PATCH] SubmittingPatches: Increase the line length limit from 80 to 100 colums
The overwhelming majority of kernel developers have stopped
using 80 col terminals years ago.
As far as I'm aware I was the last regular kernel contributor
who still used a standard VGA text console, but both text
consoles and using them to read the kernel source code has
become increasingly gruesome years ago so I switched to a wider
terminal two years ago.
Worse than that, people are actively uglifying the kernel code
to fit things into 80 cols mechanically. They are using
checkpatch and are interpreting the 80 col warnings the wrong
way again and again, sucking up reviewer bandwidth that could be
utilized better.
So lets increase the limit to 100 cols - this is a nice round
limit, and it also happens to match with most developer xterm
sizes. Code that goes over 100 cols for no good reasons will be
arguably something worth fixing. (100 cols is also arguably
closer to various brain limits such as vision of field and
resolution restrictions, so we'll likely not have to increase
this limit for a couple of million years, for all retro human
genome users.)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 2b90d32..e87370f 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -27,7 +27,7 @@ how the indentation works if you have large indentations.
Now, some people will claim that having 8-character indentations makes
the code move too far to the right, and makes it hard to read on a
-80-character terminal screen. The answer to that is that if you need
+100-character terminal screen. The answer to that is that if you need
more than 3 levels of indentation, you're screwed anyway, and should fix
your program.
@@ -77,11 +77,11 @@ Get a decent editor and don't leave whitespace at the end of lines.
Coding style is all about readability and maintainability using commonly
available tools.
-The limit on the length of lines is 80 columns and this is a strongly
+The limit on the length of lines is 100 columns and this is a strongly
preferred limit.
-Statements longer than 80 columns will be broken into sensible chunks, unless
-exceeding 80 columns significantly increases readability and does not hide
+Statements longer than 100 columns will be broken into sensible chunks, unless
+exceeding 100 columns significantly increases readability and does not hide
information. Descendants are always substantially shorter than the parent and
are placed substantially to the right. The same applies to function headers
with a long argument list. However, never break user-visible strings such as
@@ -344,8 +344,7 @@ be directly accessed should _never_ be a typedef.
Chapter 6: Functions
Functions should be short and sweet, and do just one thing. They should
-fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24,
-as we all know), and do one thing and do that well.
+fit on one or two screenfuls of text, and do one thing and do that well.
The maximum length of a function is inversely proportional to the
complexity and indentation level of that function. So, if you have a
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e3bfcbe..2d0f093 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1726,15 +1726,14 @@ sub process {
# check we are in a valid source file if not then ignore this hunk
next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/);
-#80 column limit
+#100 column limit
if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
$rawline !~ /^.\s*\*\s*\@$Ident\s/ &&
!($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:|,|\)\s*;)\s*$/ ||
$line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) &&
- $length > 80)
+ $length > 100)
{
- WARN("LONG_LINE",
- "line over 80 characters\n" . $herecurr);
+ WARN("LONG_LINE", "line over 100 characters\n" . $herecurr);
}
# check for spaces before a quoted newline
next prev parent reply other threads:[~2012-02-03 10:08 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 14:09 [patch cr 0/4] [patch cr 0/@total@] Cyrill Gorcunov
2012-01-30 14:09 ` [patch cr 1/4] fs, proc: Introduce /proc/<pid>/task/<tid>/children entry v9 Cyrill Gorcunov
2012-01-30 14:09 ` [patch cr 2/4] [RFC] syscalls, x86: Add __NR_kcmp syscall v7 Cyrill Gorcunov
2012-01-30 19:58 ` Jonathan Corbet
2012-01-30 21:07 ` Cyrill Gorcunov
2012-01-30 21:11 ` H. Peter Anvin
2012-02-02 23:26 ` Andrew Morton
2012-02-03 2:27 ` H. Peter Anvin
2012-02-03 7:09 ` Cyrill Gorcunov
2012-02-03 7:46 ` Ingo Molnar
2012-02-03 8:35 ` Cyrill Gorcunov
2012-02-03 9:09 ` Ingo Molnar
2012-02-03 9:22 ` Andrew Morton
2012-02-03 9:28 ` Cyrill Gorcunov
2012-02-03 17:32 ` H. Peter Anvin
2012-02-03 17:35 ` H. Peter Anvin
2012-02-03 17:42 ` Cyrill Gorcunov
2012-02-03 9:52 ` Ingo Molnar
2012-02-03 10:07 ` Ingo Molnar [this message]
2012-02-03 10:17 ` [PATCH] SubmittingPatches: Increase the line length limit from 80 to 100 colums Pekka Enberg
2012-02-03 10:23 ` Cyrill Gorcunov
2012-02-03 10:40 ` Alexey Dobriyan
2012-02-03 16:13 ` Tejun Heo
2012-02-03 16:39 ` hpanvin@gmail.com
2012-02-03 17:56 ` Andi Kleen
2012-02-03 20:57 ` Andrew Morton
2012-02-03 21:00 ` H. Peter Anvin
2012-02-03 21:06 ` H. Peter Anvin
2012-02-04 13:08 ` Ingo Molnar
2012-02-03 21:27 ` Linus Torvalds
2012-02-03 23:20 ` [PATCH] checkpatch: Warn on code with 6+ tab indentation Joe Perches
2012-02-04 1:27 ` Linus Torvalds
2012-02-04 1:33 ` Joe Perches
2012-02-04 3:09 ` Linus Torvalds
2012-02-04 3:21 ` Joe Perches
2012-02-04 3:35 ` Linus Torvalds
2012-02-04 3:58 ` Joe Perches
2012-02-04 1:37 ` Andrew Morton
2012-02-04 2:40 ` Eric W. Biederman
2012-02-04 2:46 ` Joe Perches
2012-02-04 4:45 ` Tony Luck
2012-02-04 4:53 ` Joe Perches
2012-02-04 13:03 ` [PATCH, v2] checkpatch: Warn on code with 6+ tab indentation, remove 80col warning Ingo Molnar
2012-02-04 16:22 ` Joe Perches
2012-02-04 18:02 ` Ingo Molnar
2012-02-04 18:48 ` Joe Perches
2012-02-04 18:54 ` Pekka Enberg
2012-02-04 19:27 ` Joe Perches
2012-02-04 19:32 ` Pekka Enberg
2012-02-05 11:38 ` Ingo Molnar
2012-02-05 16:21 ` Joe Perches
2012-02-05 18:13 ` Ingo Molnar
2012-02-05 19:01 ` [PATCH] checkpatch: Add line-length options, set default to 100 Joe Perches
2012-02-06 12:36 ` Dan Carpenter
2012-02-04 1:24 ` [PATCH] SubmittingPatches: Increase the line length limit from 80 to 100 colums Randy Dunlap
2012-02-09 21:55 ` Jan Engelhardt
2012-02-09 22:09 ` Joe Perches
2012-02-09 22:30 ` Mark Brown
2012-01-30 14:09 ` [patch cr 3/4] c/r: procfs: add arg_start/end, env_start/end and exit_code members to /proc/$pid/stat Cyrill Gorcunov
2012-02-02 23:26 ` Andrew Morton
2012-02-03 7:11 ` Cyrill Gorcunov
2012-01-30 14:09 ` [patch cr 4/4] c/r: prctl: Extend PR_SET_MM to set up more mm_struct entries Cyrill Gorcunov
2012-02-02 23:27 ` Andrew Morton
2012-02-03 7:18 ` Cyrill Gorcunov
2012-02-02 23:26 ` [patch cr 0/4] [patch cr 0/@total@] Andrew Morton
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=20120203100743.GA3334@elte.hu \
--to=mingo@elte.hu \
--cc=Valdis.Kletnieks@vt.edu \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=avagin@openvz.org \
--cc=ebiederm@xmission.com \
--cc=eric.dumazet@gmail.com \
--cc=glommer@parallels.com \
--cc=gorcunov@openvz.org \
--cc=hpa@zytor.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=keescook@chromium.org \
--cc=kosaki.motohiro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthltc@us.ibm.com \
--cc=penberg@kernel.org \
--cc=segoon@openwall.com \
--cc=serge.hallyn@canonical.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=xemul@parallels.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;
as well as URLs for NNTP newsgroup(s).