mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Zhu Jun <zhujun2@cmss.chinamobile.com>
Cc: <tiwai@suse.com>, <linux-sound@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] ASoC: Intel: avs: Add error handling in avs_tplg_parse_initial_configs
Date: Fri, 22 Nov 2024 12:10:52 +0100	[thread overview]
Message-ID: <970b517b-f1c7-4c18-88a8-aba5c2b6200c@intel.com> (raw)
In-Reply-To: <20241122063257.4419-1-zhujun2@cmss.chinamobile.com>


On 2024-11-22 7:32 AM, Zhu Jun wrote:
> Introduce error handling in avs_tplg_parse_initial_configs to ensure that
> the function returns immediately if parse_dictionary_entries fails.

Nitpick: mention functions with '()' to make them stand out next to 
their struct/field friends, e.g.: avs_tplg_parse_initial_configs().

> 
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
> ---
>   sound/soc/intel/avs/topology.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/avs/topology.c b/sound/soc/intel/avs/topology.c
> index 5cda52702..3f76581af 100644
> --- a/sound/soc/intel/avs/topology.c
> +++ b/sound/soc/intel/avs/topology.c
> @@ -1500,7 +1500,6 @@ static int avs_tplg_parse_initial_configs(struct snd_soc_component *comp,
>   				      AVS_TKN_MANIFEST_NUM_INIT_CONFIGS_U32);
>   	if (ret)
>   		return ret;
> -

Spurious whitespace change. Please remove.

>   	block_size -= le32_to_cpu(tuples->size);
>   	/* With header parsed, move on to parsing entries. */
>   	tuples = avs_tplg_vendor_array_next(tuples);
> @@ -1522,6 +1521,8 @@ static int avs_tplg_parse_initial_configs(struct snd_soc_component *comp,
>   					       AVS_TKN_MOD_INIT_CONFIG_ID_U32,
>   					       mod_init_config_parsers,
>   					       ARRAY_SIZE(mod_init_config_parsers));
> +		if (ret)
> +			return ret;
>   

Agree, outcome of parse_dictionary_entries() shall be verified.

>   		block_size -= esize;
>   

Jun, in future, please remember to add Mark Brown to the list, he's the 
maintainer who governs the ASoC subsystem. If you are unsure who 
maintains what, ./scripts/get_maintainer.pl should help with that.

      parent reply	other threads:[~2024-11-22 11:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22  6:32 Zhu Jun
2024-11-22 11:05 ` Markus Elfring
2024-11-22 11:10 ` Cezary Rojewski [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=970b517b-f1c7-4c18-88a8-aba5c2b6200c@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=zhujun2@cmss.chinamobile.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

all inboxes | Powered by JetHome®