Message ID | 1344296345.2026.3.camel@joe2Laptop |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
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
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 --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