From: Mark Brown <broonie@kernel.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [patch] spi: pxa2xx: missing break in pxa2xx_ssp_get_clk_div()
Date: Tue, 31 Mar 2015 08:49:57 +0000 [thread overview]
Message-ID: <20150331084957.GJ2869@sirena.org.uk> (raw)
In-Reply-To: <1427712912.14897.441.camel@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 680 bytes --]
On Mon, Mar 30, 2015 at 01:55:12PM +0300, Andy Shevchenko wrote:
> On Mon, 2015-03-30 at 13:30 +0300, Dan Carpenter wrote:
> > @@ -791,6 +791,7 @@ static unsigned int pxa2xx_ssp_get_clk_div(struct driver_data *drv_data,
> > switch (drv_data->ssp_type) {
> > case QUARK_X1000_SSP:
> > clk_div = quark_x1000_get_clk_div(rate, &chip->dds_rate);
> > + break;
> > default:
> > clk_div = ssp_get_clk_div(drv_data, rate);
> It would be nice to have a break here as well, but I think we also may
> change this to if-else-if construction.
No. Using if/else chains is an antipattern - think what happens when a
new hardware variant needs slightly different handling again.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-03-31 8:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 10:30 [patch] spi: pxa2xx: missing break in pxa2xx_ssp_get_clk_div() Dan Carpenter
2015-03-30 10:55 ` Andy Shevchenko
2015-03-31 8:49 ` Mark Brown [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=20150331084957.GJ2869@sirena.org.uk \
--to=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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