summaryrefslogtreecommitdiffstats
path: root/Documentation/CodingStyle
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-10-04 17:13:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-06 03:04:59 +0900
commitc4ff1b5f8bf09d77d7329cbff224f0237646c90e (patch)
treef7422a0677eac8d67e7d4acb7af4b5a1bc957613 /Documentation/CodingStyle
parent058806007450489bb8f457b275e5cb5c946320c1 (diff)
downloadop-kernel-dev-c4ff1b5f8bf09d77d7329cbff224f0237646c90e.zip
op-kernel-dev-c4ff1b5f8bf09d77d7329cbff224f0237646c90e.tar.gz
CodingStyle: add networking specific block comment style
The block comment style in net/ and drivers/net is non-standard. Document it. Signed-off-by: Joe Perches <joe@perches.com> Cc: "Allan, Bruce W" <bruce.w.allan@intel.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/CodingStyle')
-rw-r--r--Documentation/CodingStyle10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index cb9258b..495e5ba 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -454,6 +454,16 @@ The preferred style for long (multi-line) comments is:
* with beginning and ending almost-blank lines.
*/
+For files in net/ and drivers/net/ the preferred style for long (multi-line)
+comments is a little different.
+
+ /* The preferred comment style for files in net/ and drivers/net
+ * looks like this.
+ *
+ * It is nearly the same as the generally preferred comment style,
+ * but there is no initial almost-blank line.
+ */
+
It's also important to comment data, whether they are basic types or derived
types. To this end, use just one data declaration per line (no commas for
multiple data declarations). This leaves you room for a small comment on each
OpenPOWER on IntegriCloud