From: Seungwhan Youn <claude.youn@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, lrg@slimlogic.co.uk,
jassi.brar@samsung.com, Seungwhan Youn <sw.youn@samsung.com>
Subject: Re: [PATCH] ASoC: Fix to avoid compile error
Date: Mon, 4 Apr 2011 14:05:41 +0900 [thread overview]
Message-ID: <BANLkTikitgsz4ui6RicP0ES6sbFsAG_Rtw@mail.gmail.com> (raw)
In-Reply-To: <20110404045556.GA12690@opensource.wolfsonmicro.com>
On Mon, Apr 4, 2011 at 1:55 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Mon, Apr 04, 2011 at 01:15:04PM +0900, Seungwhan Youn wrote:
>
>> case SND_SOC_I2C:
>> +#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE))
>> ret = i2c_master_send(codec->control_data, data, len);
>> +#endif
>> break;
>> case SND_SOC_SPI:
>> +#if defined(CONFIG_SPI_MASTER)
>> ret = do_spi_write(codec->control_data, data, len);
>> +#endif
>> break;
>
> If we're going to ifdef these out we should be ifdefing out the entire
> case, not just the operations. Otherwise if we do manage to end up with
> a broken configuration then the code will silently report success which
> is broken - the fact that you have to initialise ret is a bad sign.
Indeed. I'll re-submit this right away.
Thank you for your comment.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
prev parent reply other threads:[~2011-04-04 5:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 4:15 [PATCH] ASoC: Fix to avoid compile error Seungwhan Youn
2011-04-04 4:55 ` Mark Brown
2011-04-04 4:43 ` [PATCHv2] " Seungwhan Youn
2011-04-04 23:23 ` Mark Brown
2011-04-04 5:05 ` Seungwhan Youn [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=BANLkTikitgsz4ui6RicP0ES6sbFsAG_Rtw@mail.gmail.com \
--to=claude.youn@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jassi.brar@samsung.com \
--cc=lrg@slimlogic.co.uk \
--cc=sw.youn@samsung.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).