public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: "Péter Ujfalusi" <peter.ujfalusi@linux.intel.com>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: pierre-louis.bossart@linux.intel.com,
	alsa-devel@alsa-project.org, kai.vehmanen@linux.intel.com,
	cujomalainey@google.com, ranjani.sridharan@linux.intel.com,
	lgirdwood@gmail.com, broonie@kernel.org
Subject: Re: [PATCH v3] ASoC: SOF: ipc3-topology: Correct get_control_data for non bytes payload
Date: Wed, 27 Apr 2022 21:47:52 +0300	[thread overview]
Message-ID: <2592d293-1423-d1a7-f404-d89bb474aeb7@linux.intel.com> (raw)
In-Reply-To: <YmlDEY960ypq/QHH@google.com>



On 27/04/2022 16:20, Sergey Senozhatsky wrote:
> On (22/04/27 22:13), Sergey Senozhatsky wrote:
>>> @@ -784,16 +785,26 @@ static int sof_get_control_data(struct snd_soc_component *scomp,
>>>  		}
>>>  
>>>  		cdata = wdata[i].control->ipc_control_data;
>>> -		wdata[i].pdata = cdata->data;
>>> -		if (!wdata[i].pdata)
>>> -			return -EINVAL;
>>>  
>>>  		/* make sure data is valid - data can be updated at runtime */
>>
>> A silly nit: does this comment belong to SOF_ABI_MAGIC check below?
> 
> I mean something like this?

yes, makes sense. Although I also played with the idea of dropping the
ABI magic check as well, but let's keep it for now.
> 
> ---
>  
>  		cdata = wdata[i].control->ipc_control_data;
>  
> -		/* make sure data is valid - data can be updated at runtime */
>  		if (widget->dobj.widget.kcontrol_type[i] == SND_SOC_TPLG_TYPE_BYTES) {
> +			/*
> +			 * make sure data is valid - data can be updated at
> +			 * runtime
> +			 */
>  			if (cdata->data->magic != SOF_ABI_MAGIC)
>  				return -EINVAL;
>  

-- 
Péter

  reply	other threads:[~2022-04-27 18:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 12:40 [PATCH v3] ASoC: SOF: ipc3-topology: Correct get_control_data for non bytes payload Peter Ujfalusi
2022-04-27 13:08 ` Sergey Senozhatsky
2022-04-27 13:09   ` Sergey Senozhatsky
2022-04-27 13:26   ` Sergey Senozhatsky
2022-04-27 13:13 ` Sergey Senozhatsky
2022-04-27 13:20   ` Sergey Senozhatsky
2022-04-27 18:47     ` Péter Ujfalusi [this message]
2022-04-28  2:19       ` Sergey Senozhatsky

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=2592d293-1423-d1a7-f404-d89bb474aeb7@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cujomalainey@google.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=senozhatsky@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox