Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
	alsa-devel@alsa-project.org, lrg@slimlogic.co.uk
Subject: Re: [PATCH] [v2] ASoC: cs4270: use the built-in register cache support
Date: Mon, 10 Jan 2011 12:33:30 -0600	[thread overview]
Message-ID: <4D2B50FA.9060102@freescale.com> (raw)
In-Reply-To: <20110110182302.GB26137@opensource.wolfsonmicro.com>

Mark Brown wrote:
> It's supposed to be 1 for change, 0 for no change or an error - if you
> look at the core functions you'll see that they generally all follow
> this idiom of using the return value from snd_soc_update_bits() directly.

Ok, so that all works then.

I found another issue.  snd_soc_update_bits() breaks if snd_soc_read() returns a
negative number, so I'll fix that.  But why do the I/O functions in soc-cache.c
do this:

static unsigned int snd_soc_16_16_read(struct snd_soc_codec *codec,
				       unsigned int reg)
{
...
	ret = snd_soc_cache_read(codec, reg, &val);
	if (ret < 0)
		return -1;


What's wrong with:

	if (ret < 0)
		return ret;

-- 
Timur Tabi
Linux kernel developer at Freescale

  reply	other threads:[~2011-01-10 18:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 16:01 [PATCH] [v2] ASoC: cs4270: use the built-in register cache support Timur Tabi
2011-01-10 16:24 ` Dimitris Papastamos
2011-01-10 16:29 ` Dimitris Papastamos
2011-01-10 16:33   ` Timur Tabi
2011-01-10 16:35     ` Mark Brown
2011-01-10 16:36     ` Dimitris Papastamos
2011-01-10 16:54       ` Timur Tabi
2011-01-10 17:35       ` Timur Tabi
2011-01-10 18:23         ` Mark Brown
2011-01-10 18:33           ` Timur Tabi [this message]
2011-01-10 18:36             ` Mark Brown
2011-01-10 18:41               ` Timur Tabi
2011-01-10 18:54                 ` Mark Brown
2011-01-10 19:03                   ` Timur Tabi
2011-01-10 19:13                     ` 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=4D2B50FA.9060102@freescale.com \
    --to=timur@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dp@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    /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