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] [day] [month] [year] [list]
Date:	Fri, 3 Aug 2012 08:10:14 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Schrober <franzschrober@...oo.de>
Cc:	Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] checkpatch: Add control statement test to
 SINGLE_STATEMENT_DO_WHILE_MACRO

Hi Franz,

On Thu, 02 Aug 2012 18:44:57 +0200 Schrober <franzschrober@...oo.de> wrote:
>
> On Thursday 02 August 2012 17:23:22 Andy Whitcroft wrote:
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > > index 913d6bd..ca05ba2 100755
> > > --- a/scripts/checkpatch.pl
> > > +++ b/scripts/checkpatch.pl
> > > @@ -3016,7 +3016,8 @@ sub process {
> > > 
> > >  					$herectx .= raw_line($linenr, $n) . "\n";
> > >  				
> > >  				}
> > > 
> > > -				if (($stmts =~ tr/;/;/) == 1) {
> > > +				if (($stmts =~ tr/;/;/) == 1 &&
> > > +				    $stmts !~ /^\s*(if|while|for|switch)\b/) {
> > > 
> > >  					WARN("SINGLE_STATEMENT_DO_WHILE_MACRO",
> > >  					
> > >  					     "Single statement macros should not use a do {} while 
> (0)
> > >  					     loop\n" . "$herectx");>  				
> > >  				}
> > 
> > Looks reasonable enough.
> > 
> > Acked-by: Andy Whitcroft <apw@...onical.com>
> 
> Works well for me, thanks
> 
> Just as note: I think this test was accidently added twice. Once in commit 
> b13edf7ff2dd0fef95e981170fa71fa6b60421b0 and one time in 
> 7d64ef43914a734990e48a80bc60686c8db21946 (just checked linux-next, and Stephen 
> added it again). Maybe Andrew Morton's tree is out of sync.

This can happen with Andrew's stuff since I rebase it onto linux-next
each day.  The rebase is sometimes happy to apply already applied
patches.  I will remove the second one today (unless Andrew beats me to
it).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ