From: Wolfgang Grandegger <wg@grandegger.com>
To: "krumboeck@universalnet.at" <krumboeck@universalnet.at>
Cc: Linux-CAN <linux-can@vger.kernel.org>
Subject: Re: [PATCH] usb2can: Add support for USB2CAN interface from 8 devices
Date: Mon, 03 Dec 2012 21:12:02 +0100 [thread overview]
Message-ID: <50BD0792.4010207@grandegger.com> (raw)
In-Reply-To: <50BCF810.6060108@universalnet.at>
On 12/03/2012 08:05 PM, krumboeck@universalnet.at wrote:
> Hi Wolfgang!
>
>
>>> The Script checkpatch.pl didn't like this comment style. I'll change it
>>> again.
>>
>> I'm confused. Could you please show the comment and the checkpatch.pl
>> message. I hope it does not argue against:
>>
>> http://lxr.linux.no/#linux+v3.6.8/Documentation/CodingStyle#L446
>
> ...
> /*
> * Send command to device and receive result.
> * Command was successful when opt1 = 0.
> */
> static int usb_8dev_send_cmd(struct usb_8dev *dev, struct
> usb_8dev_cmd_msg *out,
> struct usb_8dev_cmd_msg *in)
> {
> ...
>
> WARNING: networking block comments don't use an empty /* line, use /*
> Comment...
> #248: FILE: drivers/net/can/usb/usb_8dev.c:204:
> +
> +/*
>
> ...
> /*
> * Set network device mode
> *
> * Maybe we should leave this function empty, because the device
> * set mode variable with open command.
> */
> static int usb_8dev_set_mode(struct net_device *netdev, enum can_mode mode)
> {
> struct usb_8dev *dev = netdev_priv(netdev);
> ...
>
> WARNING: networking block comments don't use an empty /* line, use /*
> Comment...
> #413: FILE: drivers/net/can/usb/usb_8dev.c:369:
> +
> +/*
>
Wow, I obviously missed the following commit:
commit c4ff1b5f8bf09d77d7329cbff224f0237646c90e
Author: Joe Perches <joe@perches.com>
Date: Thu Oct 4 17:13:36 2012 -0700
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>
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index cb9258b..495e5ba 100644
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
Well, no comment. Sorry for the noise then. Feel free to choose what
you like (from my point of view). A *common* style seems not really to be
important.
Wolfgang.
next prev parent reply other threads:[~2012-12-03 20:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-02 9:25 [PATCH] usb2can: Add support for USB2CAN interface from 8 devices krumboeck
2012-12-02 10:36 ` Oliver Hartkopp
2012-12-02 11:45 ` Kurt Van Dijck
2012-12-02 13:35 ` Wolfgang Grandegger
2012-12-03 0:43 ` krumboeck
2012-12-03 7:26 ` Wolfgang Grandegger
[not found] ` <50BCF810.6060108@universalnet.at>
2012-12-03 20:12 ` Wolfgang Grandegger [this message]
2012-12-03 20:41 ` krumboeck
2012-12-03 8:15 ` Wolfgang Grandegger
-- strict thread matches above, loose matches on Subject: below --
2012-12-13 7:44 "Bernd Krumböck"
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=50BD0792.4010207@grandegger.com \
--to=wg@grandegger.com \
--cc=krumboeck@universalnet.at \
--cc=linux-can@vger.kernel.org \
/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).