Re: [PATCH v3 6/9] ASoC: qcom: Add QAIF PCM operations
From: Krzysztof Kozlowski
Date: Tue Aug 25 2026 - 02:08:14 EST
On 24/08/2026 12:10, Harendra Gautam wrote:
> On Mon, Aug 24, 2026 at 2:55 PM Markus Elfring <Markus.Elfring@xxxxxx> wrote:
>>
>> …
>>> +++ b/sound/soc/qcom/qaif-platform.c
>>> @@ -0,0 +1,544 @@
>> …
>>> +static int qaif_platform_pcmops_close(struct snd_soc_component *component,
>>> + struct snd_pcm_substream *substream)
>>> +{
>> …
>>> + mutex_lock(&drvdata->stream_lock);
>>> + if (v->free_stream_dma_idx)
>>> + v->free_stream_dma_idx(drvdata, data->stream_dma_idx, dai_id);
>>> + mutex_unlock(&drvdata->stream_lock);
>> …
>>
>> Under which circumstances would you become interested to apply a statement
>> like “guard(mutex)(&drvdata->stream_lock);”?
>> https://elixir.bootlin.com/linux/v7.2/source/include/linux/mutex.h#L253
>>
>> Regards,
>> Markus
> Thanks for the pointer. I believe guard() can be used across all
> stream_lock. I Will address it in the next version.
No, not really. Obvious code is replaced with more complicated one.
<form letter>
Feel free to ignore all comments from Markus, regardless whether the
suggestion is reasonable or not. Several maintainers ignore Markus'
feedback, because it is just a waste of time.
</form letter>
Best regards,
Krzysztof