public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Ben Blum <bblum@andrew.cmu.edu>
Cc: linux-kernel@vger.kernel.org,
	containers@lists.linux-foundation.org, akpm@linux-foundation.org,
	Paul Menage <menage@google.com>
Subject: Re: [PATCH 2/4] cgroups: subsystem module loading interface
Date: Tue, 29 Dec 2009 09:03:57 +0800	[thread overview]
Message-ID: <4B39557D.6000600@cn.fujitsu.com> (raw)
In-Reply-To: <20091228124029.GB4824@andrew.cmu.edu>

>>> +	write_lock(&css_set_lock);
>>> +	for (i = 0; i < CSS_SET_TABLE_SIZE; i++) {
>>> +		struct css_set *cg;
>>> +		struct hlist_node *node, *tmp;
>>> +		struct hlist_head *bucket = &css_set_table[i], *new_bucket;
>> Please add a blank line between variable declaration and other code.
>>
>> And elsewhere in this patchset.
>>
> 
> checkpatch.pl didn't trip on this [and the more screenspace-intensive
> comment style]; are they cgroups-specific style requirements or from
> somewhere higher up?
> 

You'll find the comment style in Documentation/CodingStyle:

==============
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.
         */
==============

Though the other coding style is not documented, I think it's
well accepted.

You'll hardly find code that breaks this style, say in kernel/* and
mm/*. And you can see that people pointed out this when they were
reviewing patches.

And the fact is it does make the code more readable.

  reply	other threads:[~2009-12-29  1:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-21 20:32 [PATCH 0/4] cgroups: support for module-loadable subsystems Ben Blum
2009-12-21 20:35 ` [PATCH 1/4] cgroups: revamp subsys array Ben Blum
2009-12-28  6:29   ` Li Zefan
2009-12-21 20:36 ` [PATCH 2/4] cgroups: subsystem module loading interface Ben Blum
2009-12-28  6:32   ` Li Zefan
2009-12-28 12:40     ` Ben Blum
2009-12-29  1:03       ` Li Zefan [this message]
2009-12-21 20:37 ` [PATCH 3/4] cgroups: net_cls as module Ben Blum
2009-12-28  6:34   ` Li Zefan
2009-12-28 12:37     ` Ben Blum
2009-12-21 20:38 ` [PATCH 4/4] cgroups: subsystem module unloading Ben Blum
2009-12-28  6:36   ` Li Zefan

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=4B39557D.6000600@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=bblum@andrew.cmu.edu \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.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