[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170428175547.61114-1-briannorris@chromium.org>
Date: Fri, 28 Apr 2017 10:55:47 -0700
From: Brian Norris <briannorris@...omium.org>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>
Cc: <linux-kernel@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Herbert Xu <herbert@...dor.apana.org.au>,
Ingo Molnar <mingo@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Brian Norris <briannorris@...omium.org>
Subject: [PATCH] checkpatch: don't encourage new code to use "networking" style comments
Our glorious leader has made his opinion known [1]: the "networking"
comment style is not useful for new code. While the same rules as usual
still apply -- e.g., don't unnecessarily churn existing code, and follow
existing practice within files -- that doesn't mean that checkpatch
should be enforcing that for entire directories. Among other reasons,
this can cause automatic patch generators to do the exact wrong thing:
convert perfectly good existing code into the "networking style", just
because it's in a similar directory.
[1] http://lkml.iu.edu/hypermail/linux/kernel/1607.1/00627.html
Re: [patch] crypto: sha256-mb - cleanup a || vs | typo
And funny side note from that thread:
http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1181110.html
Ingo:
"Btw., as a historic reference, there is nothing sacred about the
'networking comments coding style': I was there (way too many years ago)
when that comment style was introduced by Alan Cox's first TCP/IP code
drop, and it was little more than just a random inconsistency that
people are now treating as gospel..."
Signed-off-by: Brian Norris <briannorris@...omium.org>
---
scripts/checkpatch.pl | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index baa3c7be04ad..fb6b6570d275 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2991,15 +2991,6 @@ sub process {
}
# Block comment styles
-# Networking with an initial /*
- if ($realfile =~ m@^(drivers/net/|net/)@ &&
- $prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
- $rawline =~ /^\+[ \t]*\*/ &&
- $realline > 2) {
- WARN("NETWORKING_BLOCK_COMMENT_STYLE",
- "networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
- }
-
# Block comments use * on subsequent lines
if ($prevline =~ /$;[ \t]*$/ && #ends in comment
$prevrawline =~ /^\+.*?\/\*/ && #starting /*
--
2.13.0.rc0.306.g87b477812d-goog
Powered by blists - more mailing lists