diff mbox

[7/8] bridge: add some comments for NETDEV_RELEASE

Message ID 1344296345.2026.3.camel@joe2Laptop
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Joe Perches Aug. 6, 2012, 11:39 p.m. UTC
On Mon, 2012-08-06 at 13:50 -0700, David Miller wrote:
> From: Cong Wang <amwang@redhat.com>
> Date: Mon,  6 Aug 2012 22:23:31 +0800
> 
> > +	/*
> > +	 * We don't notify NETDEV_RELEASE event, as this will
> > +	 * stop netconsole on the bridge.
> > +	 */
> 
> Please format comments in the networking:
> 
> 	/* Like
> 	 * this.
> 	 */

Maybe add a networking specific block comment style
to checkpatch. This doesn't trigger on files outside
of drivers/net and net.

---

 scripts/checkpatch.pl |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jan Engelhardt Aug. 10, 2012, 10:59 a.m. UTC | #1
On Tuesday 2012-08-07 01:39, Joe Perches wrote:
>On Mon, 2012-08-06 at 13:50 -0700, David Miller wrote:
>> > +	/*
>> > +	 * We don't notify NETDEV_RELEASE event, as this will
>> > +	 * stop netconsole on the bridge.
>> > +	 */
>> 
>> Please format comments in the networking:
>> 
>> 	/* Like
>> 	 * this.
>> 	 */
>
>Maybe add a networking specific block comment style
>to checkpatch. This doesn't trigger on files outside
>of drivers/net and net.

Is there any particular reason why net/ wants to be special?
Before we know it, coding style is like laws across US states..
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joe Perches Aug. 10, 2012, 11:13 a.m. UTC | #2
On Fri, 2012-08-10 at 12:59 +0200, Jan Engelhardt wrote:
> On Tuesday 2012-08-07 01:39, Joe Perches wrote:
> >On Mon, 2012-08-06 at 13:50 -0700, David Miller wrote:
> >> > +	/*
> >> > +	 * We don't notify NETDEV_RELEASE event, as this will
> >> > +	 * stop netconsole on the bridge.
> >> > +	 */
> >> 
> >> Please format comments in the networking:
> >> 
> >> 	/* Like
> >> 	 * this.
> >> 	 */
> >
> >Maybe add a networking specific block comment style
> >to checkpatch. This doesn't trigger on files outside
> >of drivers/net and net.
> 
> Is there any particular reason why net/ wants to be special?

A determined maintainer with a strong desire
for consistency using an idiomatic style.

A thread about it:
https://lkml.org/lkml/2012/4/16/443


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 913d6bd..560f012 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1873,6 +1873,13 @@  sub process {
 			    "No space is necessary after a cast\n" . $hereprev);
 		}
 
+		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);
+		}
+
 # check for spaces at the beginning of a line.
 # Exceptions:
 #  1) within comments