[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20081009104359.GA31180@sirena.org.uk>
Date: Thu, 9 Oct 2008 11:44:01 +0100
From: Mark Brown <broonie@...ena.org.uk>
To: John Kacur <jkacur@...il.com>
Cc: Bryan Wu <cooloney@...nel.org>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, Cliff Cai <cliff.cai@...log.com>
Subject: Re: [alsa-devel] Fwd: [PATCH 7/9] ASoC: Blackfin: I2S CPU DAI driver
On Thu, Oct 09, 2008 at 08:58:08AM +0200, John Kacur wrote:
> On Thu, Sep 4, 2008 at 4:43 PM, Mark Brown
> <broonie@...nsource.wolfsonmicro.com> wrote:
> code, and IMO make it more readable, something like this?
> + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
> + case SND_SOC_DAIFMT_CBM_CFM: /* Passing Case */
> + break;
> + case SND_SOC_DAIFMT_CBS_CFS: /* Failing Cases */
> + case SND_SOC_DAIFMT_CBM_CFS:
> + case SND_SOC_DAIFMT_CBS_CFM:
> + ret = -EINVAL;
> + break;
> + default:
> + printk(KERN_INFO "Unknown SND_SOC_DAIFMT kind\n");
> + ret = -EINVAL;
> + break;
> + }
Yes, that's better - I'd remove the comments (they don't add much) and
the prinkt() should be a KERN_ERR or higher severity since this should
only happen as a result of a buggy machine driver. You could also just
have a single default: for the unsupported types.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists