[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1eb0d507-2017-4057-272b-cb3c298fa990@wanadoo.fr>
Date: Sun, 28 May 2023 10:04:57 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Shenghao Ding <13916275206@....com>
Cc: Ryan_Chu@...tron.com, Sam_Wu@...tron.com,
alsa-devel@...a-project.org, broonie@...nel.org,
devicetree@...r.kernel.org, gentuser@...il.com, kevin-lu@...com,
krzysztof.kozlowski+dt@...aro.org, lgirdwood@...il.com,
linux-kernel@...r.kernel.org, navada@...com, peeyush@...com,
perex@...ex.cz, pierre-louis.bossart@...ux.intel.com,
robh+dt@...nel.org, shenghao-ding@...com, tiwai@...e.de,
x1077012@...com
Subject: Re: [PATCH v4 3/6] ASoC: tas2781: Add tas2781 driver
Le 28/05/2023 à 00:35, Shenghao Ding a écrit :
> Create tas2781 driver.
>
> Signed-off-by: Shenghao Ding <13916275206-7R9yAhoRP9E@...lic.gmane.org>
>
> ---
> Changes in v4:
> - fixed issue| Reported-by: kernel test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@...lic.gmane.org>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202305192322.gBZ4JIyr-lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org/
> Changes to be committed:
> modified: sound/soc/codecs/Kconfig
> modified: sound/soc/codecs/Makefile
> new file: sound/soc/codecs/tas2781-comlib.c
> new file: sound/soc/codecs/tas2781-i2c.c
> ---
> sound/soc/codecs/Kconfig | 25 +
> sound/soc/codecs/Makefile | 6 +
> sound/soc/codecs/tas2781-comlib.c | 581 +++++++++++++++++++++++
> sound/soc/codecs/tas2781-i2c.c | 736 ++++++++++++++++++++++++++++++
> 4 files changed, 1348 insertions(+)
> create mode 100644 sound/soc/codecs/tas2781-comlib.c
> create mode 100644 sound/soc/codecs/tas2781-i2c.c
[...]
> +static void tasdev_dsp_prog_blk_remove(struct tasdevice_prog *prog)
> +{
> + struct tasdevice_data *im;
> + struct tasdev_blk *blk;
> + unsigned int nr_blk;
Purely a mater of style, but 'i' is more common, and less verbose.
(same in tasdev_dsp_cfg_blk_remove() below)
> +
> + if (!prog)
> + return;
> +
> + im = &(prog->dev_data);
> +
> + if (!im->dev_blks)
> + return;
> +
> + for (nr_blk = 0; nr_blk < im->nr_blk; nr_blk++) {
> + blk = &(im->dev_blks[nr_blk]);
> + kfree(blk->data);
> + }
> + kfree(im->dev_blks);
> +}
[...]
> +static int tasdevice_set_profile_id(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol)
> +{
> + struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
> + struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
> + int ret = 0;
> +
> + if (tas_priv->rcabin.profile_cfg_id !=
> + ucontrol->value.integer.value[0]) {
> + tas_priv->rcabin.profile_cfg_id =
> + ucontrol->value.integer.value[0];
> + ret = 0;
So 'ret' is always 0?
Is it what is expected?
If so, removing 'ret' and having return 0; below, looks fine.
Stop reading here. There seems to be a mix-up with patch 4/6.
CJ
Powered by blists - more mailing lists