From: Mark Brown <broonie@kernel.org>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/4] ASoC: simple-card: add multi-CODECs in DT
Date: Mon, 29 Dec 2014 16:30:04 +0000 [thread overview]
Message-ID: <20141229163004.GY17800@sirena.org.uk> (raw)
In-Reply-To: <e6673d036e848dd3d3eb19617f3a1a2c6c5c2d5d.1416918909.git.moinejf@free.fr>
[-- Attachment #1: Type: text/plain, Size: 1657 bytes --]
On Tue, Nov 25, 2014 at 01:30:14PM +0100, Jean-Francois Moine wrote:
> This patch allows many CODECs per link to be defined in the device tree.
It's also quite big and fiddly and hard to read, the changes that are
being made aren't blindingly obvious and there's quite a few of them.
As I've said before it's really importat that changes are clear and easy
to read, if the code is complex or surprising then the changelog needs
to be that bit more detailed to make thigs clear. Things like talking
about why the code is being moved out and how it is being transformed
would be really helpful with this one, it's not enough to know the
overall goal of the patch, I also need to know how the patch is intended
to achieve that.
I think this is mostly OK but a couple of things...
> -Example 2 - many DAI links:
> +Example 2 - many DAI links and multi-CODECs:
I'd be much happier with a new example here rather than modifying the
old one.
> @@ -365,8 +359,18 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
> */
> if (!cpu_args)
> dai_link->cpu_dai_name = NULL;
> + goto out;
>
> dai_link_of_err:
This goto out thing here is messy, it's not our normal coding style and
is error prone - better to just duplicate a small amount of cleanup.
> + for (i = 0, component = dai_link->codecs;
> + i < dai_link->num_codecs;
> + i++, component++) {
> + if (!component->of_node)
> + break;
What's this break doing here, why might we be missing a node and why
should we skip all remaining components rather than just this one as a
result - a continue would be less surprising.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-12-29 16:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 12:35 [PATCH v5 0/4] ASoC: simple-card: Add multi-CODEC support Jean-Francois Moine
2014-11-25 12:16 ` [PATCH v5 1/4] ASoC: core: add multi-codec support in DT Jean-Francois Moine
2014-11-25 13:21 ` Mark Brown
2014-11-25 12:22 ` [PATCH v5 2/4] ASoC: simple-card: Remove useless function argument Jean-Francois Moine
2014-11-25 13:49 ` Mark Brown
2014-11-25 12:30 ` [PATCH v5 3/4] ASoC: simple-card: add multi-CODECs in DT Jean-Francois Moine
2014-12-29 16:30 ` Mark Brown [this message]
2014-11-25 12:33 ` [PATCH v5 4/4] ASoC: simple-card: Remove useless check Jean-Francois Moine
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=20141229163004.GY17800@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=moinejf@free.fr \
/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
all inboxes | Powered by JetHome®