All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@sirena.org.uk>
To: John Kacur <jkacur@gmail.com>
Cc: Cliff Cai <cliff.cai@analog.com>, Bryan Wu <cooloney@kernel.org>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: Fwd: [PATCH 7/9] ASoC: Blackfin: I2S CPU DAI driver
Date: Thu, 9 Oct 2008 11:44:01 +0100	[thread overview]
Message-ID: <20081009104359.GA31180@sirena.org.uk> (raw)
In-Reply-To: <520f0cf10810082358t274a46afy7d9c5bbc5ca56de7@mail.gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@sirena.org.uk>
To: John Kacur <jkacur@gmail.com>
Cc: Bryan Wu <cooloney@kernel.org>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Cliff Cai <cliff.cai@analog.com>
Subject: Re: [alsa-devel] Fwd: [PATCH 7/9] ASoC: Blackfin: I2S CPU DAI driver
Date: Thu, 9 Oct 2008 11:44:01 +0100	[thread overview]
Message-ID: <20081009104359.GA31180@sirena.org.uk> (raw)
In-Reply-To: <520f0cf10810082358t274a46afy7d9c5bbc5ca56de7@mail.gmail.com>

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

  parent reply	other threads:[~2008-10-09 10:44 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04  8:21 [PATCH 0/9] ASoC Blackfin supporting Bryan Wu
2008-09-04  8:22 ` [PATCH 1/9] ASoC: add Blackfin build options to Kconfig and Makefile of sound soc framework Bryan Wu
2008-09-04  8:22   ` Bryan Wu
2008-09-04  8:22 ` [PATCH 2/9] ASoC: Blackfin: add Blackfin arch ASoC Kconfig and Makefile Bryan Wu
2008-09-04  8:22   ` Bryan Wu
2008-09-04 10:41   ` Mark Brown
2008-09-04 10:41     ` Mark Brown
2008-09-04  8:22 ` [PATCH 3/9] ASoC: Blackfin: SPORT peripheral interface driver Bryan Wu
2008-09-04  8:22   ` Bryan Wu
2008-09-04 10:47   ` Mark Brown
2008-09-04 10:47     ` Mark Brown
2008-09-04 14:11     ` Mike Frysinger
2008-09-04  8:22 ` [PATCH 4/9] ASoC: Blackfin: DMA Driver for AC97 sound chip Bryan Wu
2008-09-04  8:22   ` Bryan Wu
2008-09-04 12:37   ` Mark Brown
2008-09-04 12:37     ` Mark Brown
2008-09-04  8:22 ` [PATCH 5/9] ASoC: Blackfin: AC97 Blackfin CPU DAI driver Bryan Wu
2008-09-04  8:22   ` Bryan Wu
2008-09-04 12:46   ` Mark Brown
2008-09-04 12:46     ` Mark Brown
2008-09-04 12:49   ` Mark Brown
2008-09-04 12:49     ` Mark Brown
2008-09-04  8:22 ` [PATCH 6/9] ASoC: Blackfin: DMA Driver for I2S sound chip Bryan Wu
2008-09-04  8:22   ` Bryan Wu
2008-09-04 14:32   ` Mark Brown
2008-09-04 14:32     ` Mark Brown
2008-09-04  8:22 ` [PATCH 7/9] ASoC: Blackfin: I2S CPU DAI driver Bryan Wu
2008-09-04  8:22   ` Bryan Wu
2008-09-04 14:43   ` Mark Brown
2008-09-04 14:43     ` Mark Brown
2008-10-09  6:53     ` John Kacur
2008-10-09  6:58       ` Fwd: " John Kacur
2008-10-09  7:35         ` Valdis.Kletnieks
2008-10-09  8:02           ` John Kacur
2008-10-09  8:02             ` John Kacur
2008-10-09 10:44         ` Mark Brown [this message]
2008-10-09 10:44           ` [alsa-devel] " Mark Brown
2008-09-04  8:22 ` [PATCH 8/9] ASoC: Blackfin: board driver for AD1980/1 audio codec Bryan Wu
2008-09-04  8:22   ` Bryan Wu
2008-09-04 14:44   ` Mark Brown
2008-09-04 14:44     ` Mark Brown
2008-09-04  8:22 ` [PATCH 9/9] ASoC: Blackfin: board driver for SSM2602 sound chip Bryan Wu
2008-09-04  8:22   ` Bryan Wu
2008-09-04 14:49   ` Mark Brown
2008-09-04 14:49     ` 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=20081009104359.GA31180@sirena.org.uk \
    --to=broonie@sirena.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=cliff.cai@analog.com \
    --cc=cooloney@kernel.org \
    --cc=jkacur@gmail.com \
    --cc=linux-kernel@vger.kernel.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 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.