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:	Wed, 24 Oct 2012 08:01:38 +0200
From:	Thierry Reding <thierry.reding@...onic-design.de>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	"Kim, Milo" <Milo.Kim@...com>, Richard Purdie <rpurdie@...ys.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] lp855x_bl: use generic PWM functions

On Mon, Oct 22, 2012 at 03:30:12PM -0700, Andrew Morton wrote:
> On Fri, 19 Oct 2012 08:45:14 +0000
> "Kim, Milo" <Milo.Kim@...com> wrote:
> 
> > > Generally this looks good. Obviously you'll need to update any users of
> > > this driver as well. It might make sense to include those changes in
> > > this patch to avoid interim build failures.
> > 
> > Thanks for your review.
> > So far no usages for this driver in the mainline.
> > I've tested it in my own development environment instead.
> > 
> > > Other than that I have just one smaller comment below.
> > > 
> > > > +	pwm_config(lp->pwm, duty, period);
> > > > +	duty == 0 ? pwm_disable(lp->pwm) : pwm_enable(lp->pwm);
> > > 
> > > This is really ugly and should be written explicitly:
> > > 
> > > 	if (duty == 0)
> > > 		pwm_disable(lp->pwm);
> > > 	else
> > > 		pwm_enable(lp->pwm);
> > 
> > Oh, I prefer using '?' to if-sentence because it looks clear to me.
> > But if it's difficult to read/understand, I'll fix it.
> > I'd like to have others' opinion.
> > 
> 
> Hey, it's better than
> 
> 	(*(duty ? pwm_enable : pwm_disable))(lp->pwm);
> 
> !

Indeed. Fortunately there don't seem to be overly many of those. Anyway,
thanks for taking these patches.

Thierry

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ