From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Lambert, David" <dlambert@ti.com>
Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org,
Liam Girdwood <lrg@slimlogic.co.uk>,
Tony Lindgren <tony@atomide.com>, Paul Walmsley <paul@pwsan.com>
Subject: Re: [PATCH v2 1/4] ASoC: DMIC: Adding the OMAP DMIC driver
Date: Fri, 7 Jan 2011 17:13:03 +0000 [thread overview]
Message-ID: <20110107171303.GB5602@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <AANLkTinraf3OO+exD=ScMf6opsRRW7Kopt1k7ZpEiiB2@mail.gmail.com>
On Fri, Jan 07, 2011 at 10:34:53AM -0600, Lambert, David wrote:
> On Thu, Jan 6, 2011 at 4:20 PM, Mark Brown
> > I suggested switch statements previously; you didn't comment on my
> > reply.
> Sorry... my personal standard on when to go with a switch statement is
> >2 choices,
> I'll change it over to a switch...
Think about the impression you're creating here: if someone had a review
comment on one version of a patch and you neither reply nor address it
in the patch they're very likely to have the same comment again.
> >> + switch (rate) {
> >> + case 192000:
> >> + div = 5;
> >> + break;
> >> + default:
> >> + div = 8;
> > Shouldn't the default case be a case 96000?
> The default case IS 96000 (only options for rate here are 96000 and
> 192000), isn't it?
Think about this from a robustness, legibility and maintainability point
of view - the above code doesn't clearly do the right thing, and if any
other sample rates are added it'll be buggy.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-01-07 17:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 14:00 [PATCH v2 0/4] Adding OMAP DMIC driver to kernel David Lambert
2011-01-06 14:00 ` [PATCH v2 1/4] ASoC: DMIC: Adding the OMAP DMIC driver David Lambert
2011-01-06 22:20 ` Mark Brown
2011-01-07 16:34 ` Lambert, David
2011-01-07 17:13 ` Mark Brown [this message]
2011-01-06 14:00 ` [PATCH v2 2/4] ASoC: DMIC codec: Adding a generic DMIC codec David Lambert
2011-01-12 0:54 ` [alsa-devel] " Liam Girdwood
2011-01-06 14:00 ` [PATCH v2 3/4] OMAP4: hwmod: add entries for DMIC driver David Lambert
2011-01-06 22:23 ` Mark Brown
2011-01-06 22:39 ` Kevin Hilman
2011-01-06 14:00 ` [PATCH v2 4/4] OMAP4: DMIC: Add DMIC codec platform devices David Lambert
2011-01-06 22:25 ` Mark Brown
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=20110107171303.GB5602@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=dlambert@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=paul@pwsan.com \
--cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).