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]
Message-ID: <20110324220224.GA4604@xanatos>
Date:	Thu, 24 Mar 2011 15:02:24 -0700
From:	Sarah Sharp <sarah.a.sharp@...ux.intel.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Andy Whitcroft <apw@...onical.com>, linux-kernel@...r.kernel.org,
	James Bottomley <James.Bottomley@...senPartnership.com>
Subject: Re: [RFC] checkpatch: add option to change warning return value.

On Thu, Mar 24, 2011 at 02:23:49PM -0400, Steven Rostedt wrote:
> On Thu, 2011-03-24 at 08:40 -0700, Sarah Sharp wrote:
> > On Tue, Mar 22, 2011 at 09:41:17PM -0400, Steven Rostedt wrote:
> > > On Tue, Mar 22, 2011 at 04:22:46PM -0700, Sarah Sharp wrote:
> > > > > @@ -1096,6 +1099,9 @@ sub report {
> > > > >  
> > > > >  	push(our @report, $line);
> > > > >  
> > > > > +	if ($lazy == 1) {
> > > > > +		return 0;
> > > > > +	}
> > > > >  	return 1;
> > > > >  }
> > > > >  sub report_dump {
> > > 
> > > Instead of this hunk, have:
> > > 
> > > 
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > > index 58848e3..54ec3d9 100755
> > > --- a/scripts/checkpatch.pl
> > > +++ b/scripts/checkpatch.pl
> > > @@ -316,7 +316,7 @@ for my $filename (@ARGV) {
> > >  	}
> > >  	close($FILE);
> > >  	if (!process($filename)) {
> > > -		$exit = 1;
> > > +		$exit = 1 if (!$lazy);
> > >  	}
> > >  	@rawlines = ();
> > >  	@lines = ();
> > 
> > Hmm, but isn't that going to skip returning an exit value if there's an
> > error as well?  I really do want it to fail if there's an error, just
> > not if there's a warning.
> 
> Ah, I was a bit confused as you had report return 0, which is used by
> both errors and warnings.
> 
> Would you want something like this:
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 58848e3..40cbc2f 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1109,7 +1109,7 @@ sub ERROR {
>  }
>  sub WARN {
>  	if (report("WARNING: $_[0]\n")) {
> -		our $clean = 0;
> +		our $clean = 0 if (!$lazy);
>  		our $cnt_warn++;
>  	}
>  }

Yes, that's basically what I did in the second revision of the patch,
although I didn't have enough perl skillz to know about the if (!$lazy)
syntax.

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