lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 23 Jul 2013 13:18:38 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Lilis Iskandar <veeableful@...il.com>
Cc:	devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: bcm: Qos: Fix some coding style issues

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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ