mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@avionic-design.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Kim, Milo" <Milo.Kim@ti.com>, Richard Purdie <rpurdie@rpsys.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] lp855x_bl: use generic PWM functions
Date: Wed, 24 Oct 2012 08:01:38 +0200	[thread overview]
Message-ID: <20121024060138.GE9787@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <20121022153012.253a6954.akpm@linux-foundation.org>

[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]

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@ti.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

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2012-10-24  6:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19  8:11 Kim, Milo
2012-10-19  8:21 ` Thierry Reding
2012-10-19  8:45   ` Kim, Milo
2012-10-22 22:30     ` Andrew Morton
2012-10-24  6:01       ` Thierry Reding [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121024060138.GE9787@avionic-0098.mockup.avionic-design.de \
    --to=thierry.reding@avionic-design.de \
    --cc=Milo.Kim@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome