From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Zeng Zhaoming <zhaoming.zeng@freescale.com>
Cc: alsa-devel@alsa-project.org, s.hauer@pengutronix.de,
zengzm.kernel@gmail.com, lrg@slimlogic.co.uk,
arnaud.patard@rtp-net.org, linuxzsc@gmail.com
Subject: Re: [PATCH v3] ASoC: Add Freescale SGTL5000 codec support
Date: Thu, 17 Feb 2011 06:11:38 +0000 [thread overview]
Message-ID: <20110217061138.GB9645@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20110216185352.GC21063@ubuntu.localdomain>
On Thu, Feb 17, 2011 at 02:53:52AM +0800, Zeng Zhaoming wrote:
> On Wed 2011-02-16 19:53:14, Mark Brown wrote:
> > On Wed, Feb 16, 2011 at 06:56:16AM +0800, zhaoming.zeng@freescale.com wrote:
> > > + l = (reg & SGTL5000_DAC_VOL_LEFT_MASK) >> SGTL5000_DAC_VOL_LEFT_SHIFT;
> > > + r = (reg & SGTL5000_DAC_VOL_RIGHT_MASK) >> SGTL5000_DAC_VOL_RIGHT_SHIFT;
> > > + l = l < 0x3c ? 0x3c : l;
> > > + l = l > 0xfc ? 0xfc : l;
> > > + r = r < 0x3c ? 0x3c : r;
> > > + r = r > 0xfc ? 0xfc : r;
> > My previous comments about the lebility of this still stand.
> Sorry, I don't catch you means quite well, you means more comments to make it clearer?
It needs to be clearer and I'm pretty certain that comments aren't
enough to deal with the issue - the stack of ternery operators and magic
numbers just isn't good for comprehensibility.
> > Since there's no macro arguments this could just be defined directly in
> > line.
> you means add it to kcontrol array directly instead of define a macro for it?
Yes.
next prev parent reply other threads:[~2011-02-17 6:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-15 22:56 [PATCH v3] ASoC: Add Freescale SGTL5000 codec support zhaoming.zeng
2011-02-16 18:01 ` Arnaud Patard
2011-02-16 18:01 ` Zeng Zhaoming
2011-02-17 2:11 ` Mark Brown
2011-02-16 19:53 ` Mark Brown
2011-02-16 18:53 ` Zeng Zhaoming
2011-02-17 6:11 ` Mark Brown [this message]
2011-02-16 22:20 ` Timur Tabi
2011-02-16 18:33 ` Zeng Zhaoming
2011-02-16 23:01 ` Mark Brown
2011-02-17 8:52 ` Arnaud Patard
2011-02-17 1:21 ` Zeng Zhaoming
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=20110217061138.GB9645@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.patard@rtp-net.org \
--cc=linuxzsc@gmail.com \
--cc=lrg@slimlogic.co.uk \
--cc=s.hauer@pengutronix.de \
--cc=zengzm.kernel@gmail.com \
--cc=zhaoming.zeng@freescale.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.