Search Linux Wireless

RE: [PATCH] checkpatch: Add some --strict coding style checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Joe Perches [mailto:joe@xxxxxxxxxxx]
> Sent: Tuesday, February 21, 2012 5:59 PM
> To: Allan, Bruce W
> Cc: David Miller; Andy Whitcroft; Andrew Morton;
> andrei.emeltchenko.news@xxxxxxxxx; linville@xxxxxxxxxxxxx; linux-
> wireless@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH] checkpatch: Add some --strict coding style checks
> 
> On Wed, 2012-02-22 at 01:56 +0000, Allan, Bruce W wrote:
> > > On Tue, 2012-02-21 at 22:09 +0000, Allan, Bruce W wrote:
> > > > This appears to falsely complain about parenthesis alignment in
> > > > conditional statements with multiple opening parentheses.
> > > Can you try this one please?
> []
> > It's better, but there are still instances of false hits AFAICT.
> 
> Do you have any examples?
> The only one I noticed was spaces for alignment instead of tabs.
> I think that's not a false hit myself.
> 

Example 1:
	if (((a == b) ||
	     (c == d) ||
	     (e == f)) &&
	    (bool_var))
		baz();

Example 2:
	if ((!(var & FOO_MASK) &&
	     (a == b)) ||
	    (c == d))
		baz();

Example 3:
	if (!((foo & FOO_MASK) &&
	      (bar & BAR_MASK)))
		baz();

HTH,
Bruce.
��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux