public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Lilis Iskandar <veeableful@gmail.com>
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: bcm: Qos: Fix some coding style issues
Date: Tue, 23 Jul 2013 13:18:38 +0300	[thread overview]
Message-ID: <20130723101838.GN5585@mwanda> (raw)
In-Reply-To: <1374574241.17286.8.camel@desktop>

On Tue, Jul 23, 2013 at 06:10:41PM +0800, Lilis Iskandar wrote:
> Hi Dan,
> 
> I have already accepted my fate when I submitted the patch. Though it's
> really great that I receive a response so fast :)
> 
> Regarding the braces, I thought it would be more readable that way
> because of the long code wrapping inside the "if" parameter.

The way to do that is to use spaces to align the stuff in the if
statement.

	if (long_ blah blah blah blah blah blah ==
	    this part lines up with the 'l' in "long_")
		frob();

Read CodingStyle.  One other thing is that in staging we prefer if
multi-line indents have braces around them even if it's not needed.

Ugly:
	for (i = 0; i < 100; i++)
		if (x) {
			frob();
			frob();
			frob();
		}

Nice to look at:
	for (i = 0; i < 100; i++) {
		if (x) {
			frob();
			frob();
			frob();
		}
	}

> I'll fix it and send the patches again in pieces. Should I send a
> new mail or reply to this thread?

This thread, but it doesn't matter.

regards,
dan carpenter



  reply	other threads:[~2013-07-23 10:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23  9:20 [PATCH] Staging: bcm: Qos: Fix some coding style issues Lilis Iskandar
2013-07-23  9:54 ` Dan Carpenter
2013-07-23 10:10   ` Lilis Iskandar
2013-07-23 10:18     ` Dan Carpenter [this message]
2013-07-23 11:51       ` Lilis Iskandar
2013-07-23 15:11         ` Dan Carpenter
2013-07-23 16:42         ` Joe Perches
2013-07-23 18:25           ` Lilis Iskandar

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=20130723101838.GN5585@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=veeableful@gmail.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