All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: tiwai@suse.de, liam.r.girdwood@linux.intel.com,
	alsa-devel@alsa-project.org,
	Rakesh Ughreja <rakesh.a.ughreja@intel.com>,
	vkoul@kernel.org
Subject: Re: [PATCH v5 3/8] ASoC: Intel: Boards: Machine driver for SKL+ w/ HDAudio codecs
Date: Wed, 1 Aug 2018 11:04:42 +0100	[thread overview]
Message-ID: <20180801100442.GD5509@sirena.org.uk> (raw)
In-Reply-To: <20180727230554.31027-4-pierre-louis.bossart@linux.intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 1324 bytes --]

On Fri, Jul 27, 2018 at 06:05:49PM -0500, Pierre-Louis Bossart wrote:

> new file mode 100644
> index 000000000000..b2a9a6c6b147
> --- /dev/null
> +++ b/sound/soc/intel/boards/skl_hda_dsp_common.c
> @@ -0,0 +1,106 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright(c) 2015-18 Intel Corporation.
> + */

Please make the entire comment a C++ one in the C files so it looks more
intentional.

> +int skl_hda_hdmi_add_pcm(struct snd_soc_card *card, int device)
> +{
> +	struct skl_hda_private *ctx = snd_soc_card_get_drvdata(card);
> +	struct skl_hda_hdmi_pcm *pcm;
> +	char dai_name[NAME_SIZE];
> +	static int i = 1;	/* hdmi codec dai name starts from index 1 */
> +
> +	pcm = devm_kzalloc(card->dev, sizeof(*pcm), GFP_KERNEL);
> +	if (!pcm)
> +		return -ENOMEM;
> +
> +	snprintf(dai_name, sizeof(dai_name), "intel-hdmi-hifi%d", i++);
> +	pcm->codec_dai = snd_soc_card_get_codec_dai(card, dai_name);

I'm confused, i is unconditionally 1 before the print and we then
increment it even though we never reference i again?

> +	if (codec_count == 1 && pdata->codec_mask & IDISP_CODEC_MASK) {
> +		num_links = IDISP_DAI_COUNT;
> +		num_route = IDISP_ROUTE_COUNT;
> +	} else {
> +		return -EINVAL;
> +	}

A warning about unsupported configurations might be nice if the code
ever gets executed on some shiny new laptop.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2018-08-01 10:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 23:05 [PATCH v5 0/8] Enable HDA Codec support on Intel Platforms Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 1/8] ASoC: Intel: Skylake: extend widget handling Pierre-Louis Bossart
2018-08-01  9:47   ` Mark Brown
2018-07-27 23:05 ` [PATCH v5 2/8] ASoC: Intel: common: add table for HDA-based platforms Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 3/8] ASoC: Intel: Boards: Machine driver for SKL+ w/ HDAudio codecs Pierre-Louis Bossart
2018-08-01 10:04   ` Mark Brown [this message]
2018-07-27 23:05 ` [PATCH v5 4/8] ASoC: Intel: Skylake: use HDAudio if ACPI enumeration fails Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 5/8] ASoC: Intel: Skylake: add HDA BE DAIs Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 6/8] ASoC: Intel: Skylake: use hda_bus instead of hdac_bus Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 7/8] ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers Pierre-Louis Bossart
2018-07-27 23:05 ` [PATCH v5 8/8] ASoC: Intel: Skylake: add option to control HDAudio + DSP usage Pierre-Louis Bossart
2018-07-31 10:48   ` Takashi Iwai
2018-07-31 16:06     ` Pierre-Louis Bossart
2018-07-31 16:20       ` Mark Brown
2018-08-01 14:50         ` Pierre-Louis Bossart

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=20180801100442.GD5509@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=tiwai@suse.de \
    --cc=vkoul@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.