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]
Message-Id: <20140331151957.e4a856ced0f1446135376e74@linux-foundation.org>
Date:	Mon, 31 Mar 2014 15:19:57 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Joe Perches <joe@...ches.com>
Cc:	Dan Carpenter <dan.carpenter@...cle.com>,
	Andy Whitcroft <apw@...onical.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 1/2] checkpatch: Expand parenthesis alignment test to
 declarations, functions and assignments

On Mon, 31 Mar 2014 15:10:38 -0700 Joe Perches <joe@...ches.com> wrote:

> On Mon, 2014-03-31 at 15:06 -0700, Andrew Morton wrote:
> > On Mon, 31 Mar 2014 14:58:07 -0700 Joe Perches <joe@...ches.com> wrote:
> > 
> > > Currently the parenthesis alignment test works only on
> > > misalignments of if statements like
> > > 
> > > 	if (foo(bar,
> > > 			baz)
> > > 
> > > Expand the test to find misalignments like:
> > > 
> > > static inline int foo(int bar,
> > > 			int baz)
> > > 
> > > and
> > > 
> > > 	foo(bar,
> > > 			baz);
> > > 
> > > and
> > > 
> > > 	foo = bar(baz,
> > > 			qux);
> > > 
> > > Expand the $Inline keyword for __inline and __inline__ too.
> > > Add $Inline to $Declare so it also matches "static inline <foo>".
> > 
> > I'm having trouble understanding what this patch actually does.  Some
> > little examples would be nice.

?

> > I typed in this to play with:
> > 
> > void foo(int a,
> > 		int b)
> > {
> > }
> > 
> > but I experienced playus interruptus
> > 
> > akpm3:/usr/src/25> perl scripts/checkpatch.pl -f t.c
> > Global symbol "$c90_Keywords" requires explicit package name at scripts/checkpatch.pl line 2162.
> > Execution of scripts/checkpatch.pl aborted due to compilation errors.
> > 
> > System is Ubuntu 12.04.4 (ish).
> 
> You have to apply it to -next (your mm queue)

OK, the magic line was provided by
checkpatch-reduce-false-positives-for-missing-blank-line-after-declarations-test.patch,
which is marked "maybe merge, after I've played with it a bit".  I'll move
that hunk into
checkpatch-expand-parenthesis-alignment-test-to-declarations-functions-and-assignments.patch

--- a/scripts/checkpatch.pl~checkpatch-expand-parenthesis-alignment-test-to-declarations-functions-and-assignments-fix
+++ a/scripts/checkpatch.pl
@@ -304,6 +304,8 @@ our $Operators	= qr{
 			&&|\|\||,|\^|\+\+|--|&|\||$Arithmetic
 		  }x;
 
+our $c90_Keywords = qr{do|for|while|if|else|return|goto|continue|switch|default|case|break}x;
+
 our $NonptrType;
 our $NonptrTypeWithAttr;
 our $Type;
_

--
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