From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: Jason Cooper <jason@lakedaemon.net>,
Lior Amsalem <alior@marvell.com>, Andrew Lunn <andrew@lunn.ch>,
netdev@vger.kernel.org,
Gregory Clement <gregory.clement@free-electrons.com>,
"David S. Miller" <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/3] net: mvneta: adjust multiline comments to net/ style
Date: Mon, 19 Nov 2012 13:56:09 +0100 [thread overview]
Message-ID: <20121119135609.3808b1c7@skate> (raw)
In-Reply-To: <50AA2AD4.6030007@mvista.com>
Dear Sergei Shtylyov,
On Mon, 19 Nov 2012 16:49:24 +0400, Sergei Shtylyov wrote:
> > -/*
> > - * The two bytes Marvell header. Either contains a special value used
> > +/* The two bytes Marvell header. Either contains a special value used
>
> Why the heck you're doing this? It's the preferred style, see
> Documentation/CodingStyle, chapter 8.
No. Please read Documentation/CodingStyle, chapter 8 entirely:
===============================================================
The preferred style for long (multi-line) comments is:
/*
* This is the preferred style for multi-line
* comments in the Linux kernel source code.
* Please use it consistently.
*
* Description: A column of asterisks on the left side,
* 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.
*/
===============================================================
Seen the second part?
Please also see scripts/checkpatch.pl:
if ($realfile =~ m@^(drivers/net/|net/)@ &&
$rawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
$prevrawline =~ /^\+[ \t]*$/) {
WARN("NETWORKING_BLOCK_COMMENT_STYLE",
"networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
}
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2012-11-19 12:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 11:00 [GIT PULL] Marvell mvneta Ethernet/MDIO drivers checkpatch fixes Thomas Petazzoni
2012-11-19 11:00 ` [PATCH 1/3] net: mvmdio: use <linux/delay.h> instead of <asm/delay.h> Thomas Petazzoni
2012-11-19 11:00 ` [PATCH 2/3] net: mvmdio: adjust multiline comment to net/ style Thomas Petazzoni
2012-11-19 11:00 ` [PATCH 3/3] net: mvneta: adjust multiline comments " Thomas Petazzoni
2012-11-19 12:49 ` Sergei Shtylyov
2012-11-19 12:56 ` Thomas Petazzoni [this message]
2012-11-20 11:22 ` Sergei Shtylyov
2012-11-19 19:01 ` David Miller
2012-11-19 19:16 ` [GIT PULL] Marvell mvneta Ethernet/MDIO drivers checkpatch fixes David Miller
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=20121119135609.3808b1c7@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=alior@marvell.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=gregory.clement@free-electrons.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=sshtylyov@mvista.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).